Archive: Run another setup before installing my own code


Run another setup before installing my own code
Hi, I just use NSIS since yesterday. I have one simple problem:

When we distribute our own application, we have to install
some 3rd party software on the computer (the order of installation
is not critical). Since these software all come with their
own setup file, I like to know how to run these setup files
within my own *.sni file. So I just need to have my setup program
to start other set-up programs.

Thank you very much!


You can run external programs using one of several commands:- Exec, ExecShell, ExecWait, nsExec::Exec, nsExec::ExecToLog, nsExec::ExecToStack. The first three Exec commands may produce a dos command prompt window, the latter three will not. In fact the very last two can capture text output from the program u launch and show it in the detail window or add it to the stack for you to retrieve.

You may want to find out how to run your other setup programs silently so it looks like you just have your nsis installer running. This page might help.


Thanks!

I have used the following function to run StartMenu.exe which
is one of examples given in ModernUI of NSIS. But I wonder if there
is any other approach I can use.

I am not sure if I can run silently since there is a license page
in other 3rd party software setup program waiting for input from user.

Function .onInstSuccess

MessageBox MB_YESNO "Done with shapes.exe, install modern.exe?" IDNO NoInstall
Exec StartMenu.exe
NoInstall:

FunctionEnd


If you use ExecWait you won't have to ask the user to press OK when finished with the installation. ExecWait can also get you the return code of the installer process so you can figure out if it was installed according to it. NSIS installers return 0 on success, non-zero on failure.

If the installer doesn't wait for the other installer even though you have used ExecWait then you should read path Sunjammer linked to, it contains information about several installers and how to make them really silent and work with ExecWait.