Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Detect environment settings (http://forums.winamp.com/showthread.php?t=174713)

pjm31 30th March 2004 14:33

Detect environment settings (newbee)
 
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 15:01

Hi :)

I think that'll do the trick:

PHP Code:

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


All times are GMT. The time now is 04:40.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.