Archive: command line OR userInteractive with InstType


command line OR userInteractive with InstType
I have read copious amounts about using InstType for "Typical", "Default", etc...

I have a command line arg install option and (if no command line args) a user interface option (specify INSTDIR, USERNAME, PASSWORD). I have both of these functional, but it seems that they are mutually exclusive;
1.DirText, Page all need to be outside any Section or Function and as soon as you do that, they spring up by default, thus shorting out my command line install
2.I have been trying to use Section, SubSection, SectionIn to make the two install methods invisible to each other and have not been successful.

Can you use a .ini file to keep these two install options separate? If so, how?

Any suggestions?
mdm


So, you currently have it so that if the user runs your application with command line options, you want to hide the Components page and unselect some sections.

Firstly, you can skip pages using Abort.
I'd set a variable (use Var MyVar to make a special one) to a value (e.g. skip) if the user has used command line options.
Then, StrCmp $MyVar skip 0 +2 to Abort pages.

There is a topic on this forum from not long ago which shows how selecting and de-selecting sections can be achieved.

If I have understood your questions incorrectly, then sorry :)
Please explain a bit more.

-Stu


I just got it to run, but I think its abit odd: if detect a command line argument in .onInit (>""), I simply avoid exiting any function until the end and then I do an Abort. This seems to keep my command line install 'blind' to pages, DirText and the rest of an interactive install that I wouldn't want. Alternatively, if I have "" for command line args then I exit .onInit and there are my pages.

It seems like there's a better way to do it.

In your reply, are you suggesting that I use something like "How to control Section selections, while using SubSections & InstTypes " (http://nsis.sourceforge.net/archive/...php?pageid=121)? I had a problem understanding how to utilize that::once you're in a section then the pages become visible and I don't want that.
Thanks for your help
mdm


Not that, here:

http://forums.winamp.com/showthread....hreadid=143805

-Stu