Uninstall old installer based setup first
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
; and published under the Terms of the General Public License.
|
||||
; credits: http://www.opsi.org/en/credits/
|
||||
|
||||
|
||||
Set $UninstallProgram$ = $InstallDir$ + "\" + $UninstallProg$
|
||||
Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini"
|
||||
|
||||
if FileExists($IniFile$)
|
||||
@@ -30,6 +30,14 @@ if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
|
||||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
if FileExists($UninstallProgram$)
|
||||
comment "Uninstall program found, starting uninstall"
|
||||
Dosbatch_uninstall
|
||||
sub_check_exitcode
|
||||
Winbatch_uninstall /WaitforProcessending "Au_.exe" /Timeoutseconds 10
|
||||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
comment "Delete files"
|
||||
Files_uninstall /32Bit
|
||||
|
||||
@@ -49,6 +57,9 @@ msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress
|
||||
[Winbatch_uninstall_msi]
|
||||
msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall]
|
||||
"$UninstallProgram$" /sp- /verysilent /norestart
|
||||
|
||||
[Files_uninstall]
|
||||
; Example for recursively deleting the installation directory:
|
||||
;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
[Actions]
|
||||
requiredWinstVersion >= "4.11.2.6"
|
||||
|
||||
DefVar $UninstallProgram$
|
||||
DefVar $MsiIdOld$
|
||||
DefVar $IniFile$
|
||||
DefVar $IniCfgFile$
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
[Actions]
|
||||
requiredWinstVersion >= "4.11.2.6"
|
||||
|
||||
DefVar $UninstallProgram$
|
||||
DefVar $MsiIdOld$
|
||||
DefVar $IniFile$
|
||||
DefVar $IniCfgFile$
|
||||
|
||||
Reference in New Issue
Block a user