/build/static/layout/Breadcrumb_cap_w.png

Reboot and Auto re-run an MSI

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

Answers (3)

Posted by: VikingLoki 18 years ago
Second Degree Brown Belt
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.
Posted by: rikx2 18 years ago
Purple Belt
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
Posted by: babric 18 years ago
Senior Purple Belt
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... :-/
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ