|
|
|
|
#1 |
|
Junior Member
Join Date: Jul 2007
Posts: 15
|
Force uninstall->Reboot->New Install
Hi all,
I have an installer where if I am updating versions, I need to uninstall the old stuff, reboot, and then reinstall the new software, all from the same executable. Is there an easy way to do this and have it resume? My other option is to set a registry flag, copy the installer to some temporary directory, and then have it determine that the registry flag was set so I need to skip sections, but I would prefer to not have to do that manually. Thanks for the help! |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Nov 2005
Posts: 113
|
You'd use this key to launch the installer after a reboot:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" "MyInstaller" "$EXEPATH\$EXEFILE" |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2007
Posts: 15
|
Yeah, that's not the problem. Is there some way to set where I want to resume in the installer script, or to resume where I left off, or call a function or something? Without just setting it as value in some key in the registry?
|
|
|
|
|
|
#4 |
|
Major Dude
Join Date: Feb 2007
Posts: 546
|
You can add a parameter to the path in this registry entry (like '"$EXEPATH\$EXEFILE" /RESUME=YES'),
and then check on startup of the installer if this parameter is set with GetParameters and GetOptions, and skip the code you want. |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jul 2007
Posts: 15
|
Thanks. How would I actually use GetOptions to get the value of the resume parameter in a variable? The help file is rather vague.
|
|
|
|
|
|
#6 |
|
Major Dude
Join Date: Feb 2007
Posts: 546
|
code: |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|