diff --git a/CLIENT_DATA/delsub32.ins b/CLIENT_DATA/delsub32.ins index 7d1271c..f5e99e7 100644 --- a/CLIENT_DATA/delsub32.ins +++ b/CLIENT_DATA/delsub32.ins @@ -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: ; diff --git a/CLIENT_DATA/setup32.ins b/CLIENT_DATA/setup32.ins index 2606e3e..49dbb24 100644 --- a/CLIENT_DATA/setup32.ins +++ b/CLIENT_DATA/setup32.ins @@ -6,6 +6,7 @@ [Actions] requiredWinstVersion >= "4.11.2.6" +DefVar $UninstallProgram$ DefVar $MsiIdOld$ DefVar $IniFile$ DefVar $IniCfgFile$ diff --git a/CLIENT_DATA/uninstall32.ins b/CLIENT_DATA/uninstall32.ins index b10c820..8ff0a13 100644 --- a/CLIENT_DATA/uninstall32.ins +++ b/CLIENT_DATA/uninstall32.ins @@ -6,6 +6,7 @@ [Actions] requiredWinstVersion >= "4.11.2.6" +DefVar $UninstallProgram$ DefVar $MsiIdOld$ DefVar $IniFile$ DefVar $IniCfgFile$ diff --git a/builder-product.cfg b/builder-product.cfg index 11f9285..dbd36c6 100644 --- a/builder-product.cfg +++ b/builder-product.cfg @@ -30,3 +30,7 @@ ICON_DL_INDEX=0 OPSI_INI_SECTION[0]="X86" OPSI_INI_OPTION[0]="MsiId" OPSI_INI_VALUE[0]="{ED9EF59B-0799-428E-823D-6D2B7B4FE2E0}" + +OPSI_INI_SECTION[1]="X86" +OPSI_INI_OPTION[1]="UninstallProg" +OPSI_INI_VALUE[1]="unins000.exe"