Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   How to get environment variable at runtime? (http://forums.winamp.com/showthread.php?t=235896)

rmsh 19th January 2006 11:38

How to get environment variable at runtime?
 
Hi

I want my installer to install into C:\My_Product folder. Instead of hardcoding C:\, I wanted to use %SYSTEMDRIVE%... But apparently if I use %SYSTEMDRIVE% it is resolved at the compile time but not runtime. Also NSIS doesn't let me use $SYSTEMDRIVE, it gives me a warning saying this variable is unresolved and is ignored!.

Any thoughts....

- Ramesh

Takhir 19th January 2006 12:12

Please read NSIS manual 4.2.3 Constants and 4.9.8.1 StrCpy. Use first 3 chars from $WINDIR.

kichik 19th January 2006 18:03

Or ReadEnvStr.


All times are GMT. The time now is 05:17.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.