Hi,

I have an MSI installation which launch the uninstall of an old version of the same product (Installshield 6.3 based). This uninstall end with an automatic reboot (the user is warned before).

I would like to re-run automatically the MSI package after the reboot, so I have 2 problems :

- I would like to put something in the registry (??) to re-run automatically (and delete this value once I have re-ran)
- I would like to re-run ONLY if the silent uninstall of the old package proceed well (I should test an exit bit ???)

Do you have any idea or suggestion ?

Thanks !
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
You'll need to create some kind of script/wrapper that will look for an exit code on the uninstall to determine success, if its good then create a reg key in one of the following locations depending on per machine or per user:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

Both keys are just like ..\Run, except they are executed once and removed from the registry.
Answered 07/29/2005 by: VikingLoki
Second Degree Brown Belt

Please log in to comment
0
if you could pass the uninstall to msi instead of installshield then you can use something like this for a wrapper..

=========================================
Set objWSH = CreateObject("WScript.Shell")
myuninstall = "msiexec /x <msifile> /qb-"
return = objWSH.Run(myuninstall,1,True)
if return = "1641" Then
Set bolBootNeeded = "True"
objWSH.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\InstallMyMSI", "Your command to your second msi", "REG_SZ"
end if
wscript.quit
Answered 07/29/2005 by: rikx2
Purple Belt

Please log in to comment
0
VikingLoki :

That's fine, I didn't know the "RunOnce" key, exactly what I need !


rikx2 :

if you could pass the uninstall to msi instead of installshield then you can use something like this for a wrapper..

I don't understand what you mean. What do you mean by "pass the uninstall to msi" ?

My msi package launch (using a CA 34 + *.iss file) a silent IS uninstall during the MSI UIsequence. once that it is done, there is an automatic reboot. I hope that the IS uninstall ends up before the MSI stops (because of the reboot).

one another solution would be to make an IS silent uninstall which doesn't reboot, and this is the MSI which reboots if the exit code is good. MMmmh, that would be cool. But I need to find how to automatically reboot in an MSI, conditionned by an exit code... :-/
Answered 07/30/2005 by: babric
Senior Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity