Archive: ExecWait problem with Installshield uninstalls


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!

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.


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

Hmm, OK.
And the /w switch doesn't work either appearantly.

What program are you uninstalling?


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.

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)


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


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.


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


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."