JoeMcC00L
18th April 2006 21:23 UTC
ExecWait doesn't run until installer exits
Good afternoon,
I am writing an installer that needs to call an InstallShield self-extractor using ExecWait. I am currently running it silently using the following syntax:
${If} $VAR1 == "1"
ExecWait '"path\to\selfextractor.exe" /s /a /s /sms /f1$EXEDIR\path\to\issfile.iss' $0
I used the instructions at
http://unattended.sourceforge.net/installers.php to find the command-line parameters. For some reason, the "selfextractor.exe" seems to hang in the background (taskman->processes tab) indefinately, until I end
my installer from the task manager. Then the selfextractor executes and installes the third-party product just fine.
Have any of you come across this problem? It seems to happen only with this particular EXE, as the others I include in the installer work just fine.
Thanks in advance,
Joe
Red Wine
18th April 2006 22:00 UTC
Run your selfextractor.exe from cmd e.g. selfextractor.exe /H to view and verify what params you should pass :-)
JoeMcC00L
19th April 2006 17:02 UTC
Thank you for the quick reply.
I ran it from the command line like you said, and seemed to ignore both the /H and the /? parameter. I also failed to mention in my previous post that I tested the command as you see it on a virtual machine, just from the command line, and it works fine.
Any other ideas?
JoeMcC00L
19th April 2006 19:06 UTC
Thanks for the redirect, but this doesn't help me. This gentleman's problem occurred during a silent installation of the NSIS installer, but the normal mode worked fine. I cannot even get the normal mode to work.
I removed the first /s command to confirm that the installation is indeed extracting to the $TEMP directory, which it is, and it appears that the Setup.exe that's extracted does not run until my installer is closed. I hope this helps clarify my problem.
JoeMcC00L
19th April 2006 19:32 UTC
Update: the problem still exists when I just use Exec instead of ExecWait. The window shows that the self-extractor is extracting, just like before, and while that is happening the next command in my script is being executed. I run the rest of my NSIS installer normally, and my unattended IS exe only runs after the NSIS installer is closed. Perhaps this behavior is a hard-coded into the IS installer by the third-party company who makes it?
Afrow UK
19th April 2006 23:56 UTC
Could be, in which case you could call a function in NSIS which puts itself into a loop while your installer.exe is running. You can use the FindProcDLL plugin for that.
Like so:
Push setup.exe
Call WaitForInstaller
Function WaitForInstaller
Exch $R1
Push $R0
Loop:
Sleep 1000
FindProcDll::FindProc $R1
StrCmp $R0 1 Loop
Pop $R0
Pop $R1
FunctionEnd
Would be an idea to make the installer file name unique, in case the user already has a setup.exe process.
-Stu