Archive: How i can know the unit letter of the system?


How i can know the unit letter of the system?
Hi! i would like to know how i can obten the unit letter in which the system is installed. The program I made use 2 directories and i need place thats directories in the same unit. For example:

D:\directory1

D:\directory2

The second directory will have the common files of the differents aplications that the program use.


like this:

$WINDIR

The windows directory (usually C:\windows or C:\winnt but detected at runtime)

$SYSDIR

The windows system directory (usually C:\windows\system or C:\winnt\system32 but detected at runtime)

VAR DRIVE

StrCpy $drive $WINDIR 2
or
StrCpy $drive $SYSDIR 2

you'll get 'c:' for example

HTH


Thank you
:D Thank you for your quickly answer.:up: