- NSIS Discussion
- ExecWait problem with Installshield uninstalls
Archive: ExecWait problem with Installshield uninstalls
todd_ingr
15th July 2009 19:17 UTC
ExecWait problem with Installshield uninstalls
Greetings!
I'm creating an installer that silently uninstalls previous versions of certain applications installed on a machine. Those products use Installshield.
Here's my problem. When I run an ExecWait statement for the silent uninstall of the products, ExecWait moves to the next line prematurely. This is because Installshield installers and uninstallers spawn a couple of windows during their processes.
My question is this. How can I successfully wait for the silent uninstall to finish before moving on? I can't use a Sleep statement because that's just masking the problem and times vary based upon the individual machines I'm working with.
At any rate, here's my ExecWait code.
ReadINIStr ${TEMP1} "$PLUGINSDIR\test.ini" "Field 3" "State"
${If} ${TEMP1} == "1"
ExecWait '"C:\Program Files\InstallShield Installation Information\${guid}\setup.exe" /w /s /f1$PLUGINSDIR\uninstall.iss /runfromtemp /l0x0409 /removeonly'
${EndIf}
Thanks for any input!
jpderuiter
15th July 2009 20:11 UTC
According to http://www.appdeploy.com/tips/detail.asp?id=18 you should add the /SMS switch.
See http://www.appdeploy.com/articles/In...Parameters.pdf for even more switches.
todd_ingr
15th July 2009 20:36 UTC
Originally posted by jpderuiter
According to http://www.appdeploy.com/tips/detail.asp?id=18 you should add the /SMS switch.
See http://www.appdeploy.com/articles/In...Parameters.pdf for even more switches.
Yeah, I have tried that. It appears that it only works for InstallScript MSI projects. Which mine don't appear to be.
http://kb.acresso.com/doc/Helpnet/in...EXECmdLine.htm
jpderuiter
15th July 2009 22:03 UTC
Hmm, OK.
And the /w switch doesn't work either appearantly.
What program are you uninstalling?
todd_ingr
15th July 2009 22:21 UTC
Originally posted by jpderuiter
What program are you uninstalling?
Proprietary software. Unfortunately, it's not something available to you.
I'm in software testing and each build of our product requires all other versions to be uninstalled. It's a painstaking process of uninstall them manually. So I am looking for a method to uninstall them quietly. And while I can execute the individual uninstallers quietly, I can't seem to get NSIS to wait.
I'm to the point now where I don't know if I can get this accomplished.
jpderuiter
15th July 2009 23:18 UTC
Hmm, there are two things I can think of, but neither one is pretty:
1 - wait until a certain file or registry entry is deleted
2 - wait until a certain process stopped (with Processes Plugin)
Afrow UK
16th July 2009 01:30 UTC
If it's an InstallShield setup you should be able to extract the MSI file from it and run that. The reason it isn't waiting is probably because the wrapper executable is running msiexec.exe and then exiting.
Stu
jpderuiter
16th July 2009 10:39 UTC
Yes, but that's what the SMS switch is for.
Extracting the MSI might be a good idea, but since it doesn't appear to be a InstallScript MSI installer, this will probably fail as well.
Afrow UK
16th July 2009 11:21 UTC
You've got an installer in 'InstallShield Installation Information' but you don't think it's an InstallShield setup? InstallScript is just the scripting language used for InstallShield setups so /sms should work in combination with /s.
Otherwise for extracting the MSI, if you run the setup you should see an MSI file appear in %TEMP%.
Stu
todd_ingr
16th July 2009 14:26 UTC
Originally posted by Afrow UK
You've got an installer in 'InstallShield Installation Information' but you don't think it's an InstallShield setup? InstallScript is just the scripting language used for InstallShield setups so /sms should work in combination with /s.
Otherwise for extracting the MSI, if you run the setup you should see an MSI file appear in %TEMP%.
Stu
The /SMS and /s in combination do not cause the installer to wait. So my best option seems to be extracting that MSI.
When I run the MsiExec.exe /I{guid}, I get the following error:
"This installation can not be run by directly launching the MSI package; you must run setup.exe."