Force reboot after uninstall
This commit is contained in:
@@ -19,12 +19,14 @@ if FileExists($IniFile$)
|
|||||||
comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version"
|
comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version"
|
||||||
Winbatch_uninstall_msi_old
|
Winbatch_uninstall_msi_old
|
||||||
sub_check_exitcode
|
sub_check_exitcode
|
||||||
|
set $Reboot$="1"
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")
|
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")
|
||||||
comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall"
|
comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall"
|
||||||
Winbatch_uninstall_msi
|
Winbatch_uninstall_msi
|
||||||
sub_check_exitcode
|
sub_check_exitcode
|
||||||
|
set $Reboot$="1"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
comment "Delete files"
|
comment "Delete files"
|
||||||
@@ -36,6 +38,10 @@ Registry_uninstall /32Bit
|
|||||||
comment "Delete program shortcuts"
|
comment "Delete program shortcuts"
|
||||||
LinkFolder_uninstall
|
LinkFolder_uninstall
|
||||||
|
|
||||||
|
if $Reboot$="1"
|
||||||
|
ExitWindows /ImmediateReboot
|
||||||
|
endif
|
||||||
|
|
||||||
[Winbatch_uninstall_msi_old]
|
[Winbatch_uninstall_msi_old]
|
||||||
msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress
|
msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ DefVar $ExitCode$
|
|||||||
DefVar $OLD_VERSION$
|
DefVar $OLD_VERSION$
|
||||||
DefVar $OLD_CREATOR_TAG$
|
DefVar $OLD_CREATOR_TAG$
|
||||||
DefVar $OLD_RELEASE$
|
DefVar $OLD_RELEASE$
|
||||||
|
DefVar $Reboot$
|
||||||
|
|
||||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ DefVar $InstallDir$
|
|||||||
DefVar $OLD_VERSION$
|
DefVar $OLD_VERSION$
|
||||||
DefVar $OLD_CREATOR_TAG$
|
DefVar $OLD_CREATOR_TAG$
|
||||||
DefVar $OLD_RELEASE$
|
DefVar $OLD_RELEASE$
|
||||||
|
DefVar $Reboot$
|
||||||
|
|
||||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user