Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 28th February 2003, 19:49   #1
znsr
Junior Member
 
Join Date: Feb 2003
Posts: 2
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!
znsr is offline   Reply With Quote
Old 28th February 2003, 20:46   #2
Sunjammer
Major Dude
 
Join Date: Jun 2002
Location: Swindon, UK
Posts: 559
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.
Sunjammer is offline   Reply With Quote
Old 28th February 2003, 21:43   #3
znsr
Junior Member
 
Join Date: Feb 2003
Posts: 2
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
znsr is offline   Reply With Quote
Old 28th February 2003, 21:53   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
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.

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