Autor Beitrag
patmann2001
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 201

Windows 7 Prof.
Delphi XE2
BeitragVerfasst: Mi 04.09.02 18:16 
Ich möchte zur Laufzeit das Stammverzeichniss von Windows festellen. Unter Win 9x ist das Windows und unter NT/2000/XP ist es WINNT. Allerdings könnte der User zur Installation auch ein anderes Verzeichniss wählen.

cu Patmann
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Mi 04.09.02 18:25 
hi,

das windowsverzeichnis findeste mit dem Befehl GetWindowsDirectory heraus. Hier haste die definition nach der PSDK.

Zitat:
UINT GetWindowsDirectory(
LPTSTR lpBuffer, // buffer for Windows directory
UINT uSize // size of directory buffer
);


Und hier sind die systemanforderungen.

Zitat:
Windows NT/2000/XP: Included in Windows NT 3.1 and later.
Windows 95/98/Me: Included in Windows 95 and later.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000/XP. Also supported by Microsoft Layer for Unicode.

_________________
Viele Grüße
Jakob
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Mi 04.09.02 19:27 
Hallo,

Ging das nicht auch mal irgendwie mit %windir%/datei.ext?
Diese Systemvariable wird doch von Windows gesetzt, oder?

Tschüß
Thomas

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Mi 04.09.02 19:31 
jo, diese variable wird von windows gesetzt, aber ich wüsste jetzt, nicht wie man die abfragen könnte. Du könntest ja in pfadangaben %windir&\... angeben.

_________________
Viele Grüße
Jakob
tommie-lie
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 4373

Ubuntu 7.10 "Gutsy Gibbon"

BeitragVerfasst: Mi 04.09.02 19:35 
Mein ich doch.
Einfach %windir%\progman.exe , z.B.

_________________
Your computer is designed to become slower and more unreliable over time, so you have to upgrade. But if you'd like some false hope, I can tell you how to defragment your disk. - Dilbert
OregonGhost
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 215



BeitragVerfasst: Mi 04.09.02 19:59 
Doof nur, wenn der Benutzer %windir% umdefiniert hat ;c)
GetWindowsDirectory bzw. GetSystemDirectory ist in jedem Fall der elegantere Weg.

_________________
Oregon Ghost
---
Wenn NULL besonders groß ist, ist es fast schon wie ein bisschen eins.
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: Mi 04.09.02 20:03 
deshalb habe ich ja den Befehl auch gepostet. :wink:

_________________
Viele Grüße
Jakob
patmann2001 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 201

Windows 7 Prof.
Delphi XE2
BeitragVerfasst: Fr 06.09.02 13:03 
Danke klappt
:mrgreen:
cu Patmann