Autor Beitrag
Niko S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 566
Erhaltene Danke: 10

Win 7, Ubuntu
Lazarus, Turbo Delphi, Delphu 7 PE
BeitragVerfasst: Sa 14.10.06 19:39 
Erm
Wie kann man den Windows ordner herausfniden ohne das man weiß auf welches Laufewerk Windows installiert ist?
Weil manche haben ja nicht standartmäßig auf C installiert x.X
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 14.10.06 20:31 
Indem man Windows fragt ... GetWindowsDir ;-)

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Niko S. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 566
Erhaltene Danke: 10

Win 7, Ubuntu
Lazarus, Turbo Delphi, Delphu 7 PE
BeitragVerfasst: Sa 14.10.06 21:50 
ausblenden Quelltext
1:
2:
wde := GetWinDir+'\system32\drivers\etc\hosts';
Memo1.Lines.SaveToFile(wde);


so das müsste eigendlich richtig sein
allerdings sagt er mir immer das die datei "C:\WINDOWS" nicht gespeichert werden kann
aber da oben ist doch wde als C:\WINDOWS\system32\drivers\etc\hosts
angegeben.
Kann mir jemand da weiterhelfen?



/// hat sich erledigt!