Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 20th May 2008, 14:58   #1
xcabur
Junior Member
 
Join Date: May 2008
Posts: 8
System Variable as InstallDir

Hello Together

I have a question and I hope you can help me. I want use the windows systemvariable %allusersprofile% as installdir variable in NSIS. But the systemvariable %allusersprofile% is not available as a default Constant. Is it possible to use this variable and set it as instaldir?

Thanks for Help
xcabur is offline   Reply With Quote
Old 20th May 2008, 15:11   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
There's $profile which is set to all/current depending on the SetShellVarContext.

Here's an alternative:

Function .onInit
ReadENVStr $R0 ALLUSERSPROFILE
StrCpy $INSTDIR "$R0\My Application"
;;;;;;
;;;;;;

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 20th May 2008, 15:33   #3
xcabur
Junior Member
 
Join Date: May 2008
Posts: 8
Ah thanks. It works!
xcabur is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump