views:

178

answers:

1

Hi all,

I am using NSIS for making an installer.

1.I have to just execute Mysql setup in the first step

2.And later on the successful execution of the step1 (that is installing the mysql in the system) I need to execute my database scripts.

3.now i need to run my myproj.exe

Here the problem is installer is directly running all the steps parallelly. But i have to run them step by step and only after the successful execution of the previous steps.

Thanks, srinivas.

A: 

I'm really not sure how your installer is running anything in parallel. NSIS executes commands sequentially. Unless you're going to great lengths using commands I've never seen to get NSIS to run in parallel, it's not running anything in parallel. Can you post some of your installer's source code so that I can see how you're accomplishing this?

You can use the nsExec::ExecToStack command to launch your MySql setup and get a return code from the installer like so:

!include LogicLib.nsh    
StrCpy $myReturnCode "0"
nsExec::ExecToStack "$TEMP\MySqlSetup.exe"
Pop $myReturnCode
${If} "$myReturnCode" == ""
${OrIf} "$myReturnCode" == "0"
    // Presumably it worked, continue with installation
${Else}
    // Error, don't continue with installation
${EndIf}

Note that nsExec::ExecToStack will wait for the executable to return before running the next NSIS command.

Kyle Gagnet