fixed reinstall (uninstall & install)
This commit is contained in:
parent
eef9900764
commit
33db18d1be
@ -3,23 +3,12 @@
|
||||
; and published under the Terms of the General Public License.
|
||||
; credits: http://www.opsi.org/credits/
|
||||
|
||||
DefVar $SecMonitorProgram$
|
||||
Set $SecMonitorProgram$ = $InstallDir$ + "\SecMonitor.exe"
|
||||
|
||||
Set $MsiId$ = '{106BB145-4FF6-4473-B0AE-CD8502CD123A}'
|
||||
Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe"
|
||||
|
||||
if FileExists($SecMonitorProgram$)
|
||||
Message "Uninstalling " + $ProductId$ + " ..."
|
||||
|
||||
if FileExists($UninstallProgram$)
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Winbatch_uninstall
|
||||
sub_check_exitcode
|
||||
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
|
||||
endif
|
||||
|
||||
comment "Delete files"
|
||||
Files_uninstall /32Bit
|
||||
|
||||
@ -29,18 +18,18 @@ Registry_uninstall /32Bit
|
||||
comment "Delete program shortcuts"
|
||||
LinkFolder_uninstall
|
||||
|
||||
[Winbatch_uninstall]
|
||||
; Choose one of the following examples as basis for program uninstall
|
||||
;
|
||||
; === Nullsoft Scriptable Install System ================================================================
|
||||
; "$UninstallProgram$" /S
|
||||
;
|
||||
; === Inno Setup ========================================================================================
|
||||
; "$UninstallProgram$" /silent /norestart
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Winbatch_uninstall_msi
|
||||
sub_check_exitcode
|
||||
|
||||
comment "Trigger reboot"
|
||||
ExitWindows /ImmediateReboot
|
||||
endif
|
||||
|
||||
|
||||
[Winbatch_uninstall_msi]
|
||||
msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress
|
||||
msiexec /x "$Msi32$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb!
|
||||
|
||||
|
||||
[Files_uninstall]
|
||||
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
|
||||
@ -64,6 +53,7 @@ msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress
|
||||
; set_subfolder ""
|
||||
; delete_element $ProductId$
|
||||
|
||||
|
||||
[Sub_check_exitcode]
|
||||
comment "Test for installation success via exit code"
|
||||
set $ExitCode$ = getLastExitCode
|
||||
|
@ -39,9 +39,6 @@ Message "Uninstalling " + $ProductId$ + " ..."
|
||||
if FileExists("%ScriptPath%\delsub32.ins")
|
||||
comment "Start uninstall sub section"
|
||||
Sub "%ScriptPath%\delsub32.ins"
|
||||
|
||||
comment "Trigger reboot"
|
||||
ExitWindows /Reboot
|
||||
endif
|
||||
|
||||
if $LicenseRequired$ = "true"
|
||||
|
Loading…
Reference in New Issue
Block a user