diff --git a/CLIENT_DATA/delsub32.ins b/CLIENT_DATA/delsub32.ins index 6f1e92a..fbbf1a0 100644 --- a/CLIENT_DATA/delsub32.ins +++ b/CLIENT_DATA/delsub32.ins @@ -19,12 +19,14 @@ if FileExists($IniFile$) comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" Winbatch_uninstall_msi_old sub_check_exitcode + set $Reboot$="1" endif endif if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "") comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" Winbatch_uninstall_msi sub_check_exitcode + set $Reboot$="1" endif comment "Delete files" @@ -36,6 +38,10 @@ Registry_uninstall /32Bit comment "Delete program shortcuts" LinkFolder_uninstall +if $Reboot$="1" + ExitWindows /ImmediateReboot +endif + [Winbatch_uninstall_msi_old] msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress diff --git a/CLIENT_DATA/setup32.ins b/CLIENT_DATA/setup32.ins index 4a09930..61b8a24 100644 --- a/CLIENT_DATA/setup32.ins +++ b/CLIENT_DATA/setup32.ins @@ -17,6 +17,7 @@ DefVar $ExitCode$ DefVar $OLD_VERSION$ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ +DefVar $Reboot$ Set $LogDir$ = "%SystemDrive%\tmp" diff --git a/CLIENT_DATA/uninstall32.ins b/CLIENT_DATA/uninstall32.ins index 8af0ea8..a08fa86 100644 --- a/CLIENT_DATA/uninstall32.ins +++ b/CLIENT_DATA/uninstall32.ins @@ -16,6 +16,7 @@ DefVar $InstallDir$ DefVar $OLD_VERSION$ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ +DefVar $Reboot$ Set $LogDir$ = "%SystemDrive%\tmp"