Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 27th January 2003, 05:41   #1
mrtech
Junior Member
 
Join Date: Oct 2002
Posts: 46
Preselecting InstType and/or Sections (Again)

Ok, I may not be the sharpest knife in the drawer, but after search for well over an hour in the forum, I still can't find my answer, here goes.

How can I save the InstType of the last install so that I can preselect that InstType the next time the user is upgrading?

Additionally, how can I do the same with the Setions?

I know I can write to the reg or ini, but I couldn't find a complete example that says:

- read registry
- if value, preselect insttype
- if insttype change, write registry
- install

FYI, I've already got code in the .onInit set flags for a Silent install.

Any help would be very much so appreciated.

Thanks,
Mel
mrtech is offline   Reply With Quote
Old 27th January 2003, 10:25   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
First thing first, you can't select an installation type, you can only select sections and by that force NSIS to use the desired installation type.

If you don't have custom type then you can simply add a hidden section for each installation type that will set the registry key. If you do have custom type it will be a bit trickier. For that you have to either write 1 to an INI or the registry for each section that was selected inside the section itself or iterate on all of the sections using SectionGetFlags and prepering a string of zeros and ones. When starting the installer next time you can set the section flags according to this list.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik 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