sp00nyG
18th June 2009 03:43 UTC
Single-dialog Bootstrapper
Hi, I have a pretty straightforward need-- to utilize NSIS to act as a bootstrapper for an MSI I have authored using WiX. (I chose NSIS because I have requirements that the generic Windows SDK bootstrapper cannot handle, and I don't have the knowledge to write my own bootstrapper from scratch.)
Basically I need to do a series of registry, filesystem, IIS, etc checks on the destination system and take appropriate action if things are found or not found. Then once that is done I have to run several 3rd party application installers-- Flash, Adobe Reader, etc. Finally the bootstrapper will fire off "msiexec," and my application's install takes over from there.
This is all working like a charm. However, the problem I am facing is on the UI side. I would just like to have the user double-click setup.exe, and a single window appears with maybe a progress bar to indicate the status of the bootstrap process.
There isn't a need for a license dialog, a component selection dialog, or even a "instfiles" dialog since nothing is actually getting copied, in the sense of a typical installer.
I'm trying to figure out how to customize the UI to get what I need but I'm getting lost in a sea of InstallOptions, nsDialog, Modern UI, Ultra Modern UI, etc. I have no idea which one I would use to achieve a single dialog install.
Many thanks in advance for any pointers!
Afrow UK
18th June 2009 18:49 UTC
Just use an InstFiles page then with ShowInstDetails nevershow and AutoCloseWindow true set.
Stu
sp00nyG
18th June 2009 21:02 UTC
Excellent, thanks! This gets me a bit further-- now I no longer have the unnecesary dialogs.
But-- a couple more questions.
1. How can I customize the progress text? I'd like to be able to display "Installing Adobe Reader..." in the progress text instead of "Executing C:\Docum~1\Admin~1\LocalSe~1\...."
2. How can I change the generic "llama" icon in the dialog and in the setup.exe icon?
I'm really really confused with regards to the Modern UI, Modern UI 2, InstallOptionsEx, nsDialogs, and how they all work with the "core" NSIS.
Thanks again!
Anders
18th June 2009 23:16 UTC
1) SetDetailsPrint none + DetailPrint "foo"
2) Icon
Afrow UK
19th June 2009 14:42 UTC
2. Or if using MUI, !define MUI_ICON file.ico.
Stu
sp00nyG
19th June 2009 14:58 UTC
If I do a "SetDetailsPrint none + DetailPrint 'blah'" then no text is shown above the progress bar.
Also, it looks like the welcome page textbox is overlapping the bottom part of the dialog, covering the "Nullsoft Install System" text. See attached screenshot, annotated. I dont know how I can modify this. I eventually want to change this text to my company's name, so this will be an issue.
I am using MUI2, if that makes a difference.
Thanks again!
Anders
19th June 2009 15:22 UTC
detailprint first, then setdetailprint none
When the MUI is messed up like that you are probably using the macros in the wrong order or you forgot the language macro, check the samples
sp00nyG
19th June 2009 17:22 UTC
ahh ok I'm with you now... thanks!