Old 22nd October 2013, 11:31   #1
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 192
Execution of an installer from another installer

Hi!

I have the following problem. An year ago I made an installer that installs company specific tools. It is made with NSIS script. Now I made another installer (again with NSIS) and I need the tools from the installer that I made before. So in my new script I simply extract it to the temp folder and call with (with ExecWait). But it never runs. When the installation is finished and I try to execute it manually, all works fine, but not until my new installer runs. Probably my explanation became complicated, but I simply want to execute NSIS installer from another NSIS installer and this didn't work. Is there any explanation about it?
TrifonovS is offline   Reply With Quote
Old 22nd October 2013, 13:04   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
- Put a messagebox with the execution path before your ExecWait command, to show the exact path NSIS is trying to execute.
- check the return code, or launch a dummy exe with only a messagebox, to see if the execwait command is succesful.
MSG is offline   Reply With Quote
Old 22nd October 2013, 13:25   #3
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 192
I found the problem. In all my scripts in .onInit function I check for running instance of the installer like this:

System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e'
Pop $R0
${If} $R0 != 1
Abort
${EndIf}

So if another installer is already running, the embedded in it installer simply exits without to make any actions.
Probably I can use a command line parameter to disable this feature when I want to.
TrifonovS is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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