PDA

View Full Version : Detect environment settings


pjm31
30th March 2004, 13:33
Hi,

I'm looking for a script that would detect on which unit is located the "Documents and Settings" repertory. (It may have moved to D:, E:, ....).

How can I store in variable $my_ds_ddrive the first letter of the string $HOMEDIR ?

Can anybody help me ? ::(

Thanks a lot :)

evilO
30th March 2004, 14:01
Hi :)

I think that'll do the trick:


StrCpy $0 $DOCUMENTS 1
Messagebox MB_OK "Documents directory : $DOCUMENTS $\nLetter : $0"


BTW, it's "$DOCUMENTS" the constant you're looking for. Other constants are available in the doc :

http://nsis.sourceforge.net/Docs/

Voila ;)

evilO/Olive