Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 8th October 2010, 03:40   #1
Radix999
Junior Member
 
Join Date: Sep 2010
Posts: 2
Silent Installs - how to change StartMenuGroup and InstallDir programmatically?

I've added silent support (with a record option) to my NSIS installers and the only thing I'm having problems with is the correct way to read/save the default Start Menu group and Installation directory.

I'm using the MUI2 theme, and its dialogs are handling both of these pages - but can't see where its reading/saving these values. What variables should I be changing?

Cheers in advance!
Radix999 is offline   Reply With Quote
Old 8th October 2010, 04:27   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
The MUI directory page copies the picked folder path into the $INSTDIR variable.
The MUI Start Menu page copies the picked start menu path into the variable you specify in the '!insertmacro MUI_PAGE_STARTMENU ID Variable' line.

So you would manually copy appropriate values into those two variables when detecting a silent installation.
Animaether is offline   Reply With Quote
Old 8th October 2010, 15:39   #3
Radix999
Junior Member
 
Join Date: Sep 2010
Posts: 2
Thanks for your reply.

I actually managed to figure out the $INSTDIR variable after a bit of trial and error, but the StartMenuGroup eludes me still.

The variable I'm passing to that macro is $StartMenuGroup - seems simple enough, but when I read that value I get something completely different than I expected - it's a path like C:\Users\XXX\AppData\Roaming\xxx\StartMenu\ (sorry, not at work atm and don't remember the full path, but it seemed more like the path TO the StartMenu group and not the name specified by the user.
Radix999 is offline   Reply With Quote
Old 8th October 2010, 19:07   #4
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
The value stored in the $StartMenuGroup is actually the full path to the user's Start Menu + the start menu entry (which gets stored as another folder). So when you run it in silent mode, you will have to append an appropriate start menu entry to that path yourself.
Animaether is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
nsis silent install

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