new handling of old releases uninstall
This commit is contained in:
parent
7b2d5e84ad
commit
7336f52154
@ -4,34 +4,34 @@
|
||||
; credits: http://www.opsi.org/credits/
|
||||
|
||||
|
||||
Set $MsiId$ = '{28C70D19-6DE9-43EF-BFA3-342F4A11B727}'
|
||||
Set $MsiIdHelp$ = '{D010EBB6-6CDB-4360-90ED-743156F3E11F}'
|
||||
Set $MsiIdOld$ = '{09D72100-CAC9-42BF-AD52-47F784C92DB6}'
|
||||
Set $MsiIdHelOldp$ = '{1148C874-13B5-48FE-B5AE-F8AB2D6F06C8}'
|
||||
Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini"
|
||||
|
||||
Message "Uninstalling " + $ProductId$ + " ..."
|
||||
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi_old
|
||||
if FileExists($IniFile$)
|
||||
Set $MsiIdOldHelpDe$ = GetValueFromInifile($IniFile$,"X86","MsiIdHelpDe","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOldHelpDe$ + "] DisplayName") = "")
|
||||
comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version"
|
||||
Winbatch_uninstall_help_de_msi_old
|
||||
sub_check_exitcode
|
||||
endif
|
||||
Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "")
|
||||
comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version"
|
||||
Winbatch_uninstall_msi_old
|
||||
sub_check_exitcode
|
||||
endif
|
||||
endif
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdHelpDe$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiIdHelpDe$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_help_de_msi
|
||||
sub_check_exitcode
|
||||
endif
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdHelpOld$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiIdHelpOld$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi_help_old
|
||||
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
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdHelp$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiIdHelp$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi_help
|
||||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
comment "Delete files"
|
||||
Files_uninstall /32Bit
|
||||
@ -42,23 +42,22 @@ Registry_uninstall /32Bit
|
||||
comment "Delete program shortcuts"
|
||||
LinkFolder_uninstall
|
||||
|
||||
[Winbatch_uninstall_help_de_msi_old]
|
||||
msiexec /x $MsiIdOldHelpDe$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi_old]
|
||||
msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi_help_old]
|
||||
msiexec /x $MsiIdHelpOld$ /qb! REBOOT=ReallySuppress
|
||||
[Winbatch_uninstall_help_de_msi]
|
||||
msiexec /x $MsiIdHelpDe$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi]
|
||||
msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi_help]
|
||||
msiexec /x $MsiIdHelp$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Files_uninstall]
|
||||
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
|
||||
;
|
||||
delete -sf "$InstallDir$\"
|
||||
delete -sf "$InstallDirOld$\"
|
||||
; delete -sf "$InstallDir$\"
|
||||
|
||||
[Registry_uninstall]
|
||||
; Example of deleting a registry key:
|
||||
|
7
CLIENT_DATA/opsi-documentfoundation.libreoffice.ini
Normal file
7
CLIENT_DATA/opsi-documentfoundation.libreoffice.ini
Normal file
@ -0,0 +1,7 @@
|
||||
[X86]
|
||||
MsiId={28C70D19-6DE9-43EF-BFA3-342F4A11B727}
|
||||
MsiIdHelpDe={D010EBB6-6CDB-4360-90ED-743156F3E11F}
|
||||
|
||||
[COMMON]
|
||||
PN=documentfoundation.libreoffice
|
||||
VERSION=3.5.3
|
@ -6,15 +6,15 @@
|
||||
[Actions]
|
||||
requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
; DefVar $MsiId$
|
||||
DefVar $MsiIdOld$
|
||||
DefVar $MsiIdHelpOld$
|
||||
DefVar $MsiId$
|
||||
DefVar $MsiIdHelp$
|
||||
DefVar $MsiIdOldHelpDe$
|
||||
DefVar $IniFile$
|
||||
DefVar $IniCfgFile$
|
||||
DefVar $LogDir$
|
||||
DefVar $ProductId$
|
||||
DefVar $MinimumSpace$
|
||||
DefVar $InstallDir$
|
||||
DefVar $InstallDirOld$
|
||||
DefVar $ExitCode$
|
||||
|
||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
@ -39,7 +39,7 @@ Set $ProductId$ = "documentfoundation.libreoffice"
|
||||
Set $MinimumSpace$ = "1500 MB"
|
||||
; the path were we find the product after the installation
|
||||
Set $InstallDir$ = "%ProgramFiles32Dir%\LibreOffice 3.5"
|
||||
Set $InstallDirOld$ = "%ProgramFiles32Dir%\LibreOffice 3.4"
|
||||
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
|
||||
; ----------------------------------------------------------------
|
||||
|
||||
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
|
||||
@ -60,9 +60,7 @@ else
|
||||
comment "Start setup program"
|
||||
Winbatch_install
|
||||
Sub_check_exitcode
|
||||
|
||||
comment "Start setup program"
|
||||
Winbatch_install_help
|
||||
Winbatch_install_help_de
|
||||
Sub_check_exitcode
|
||||
|
||||
comment "Copy files"
|
||||
@ -88,10 +86,13 @@ endif
|
||||
[Winbatch_install]
|
||||
msiexec /i "$InstallMsi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_install_help]
|
||||
msiexec /i "$InstallHelpMsi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
|
||||
[Winbatch_install_help_de]
|
||||
msiexec /i "$InstallHelpDeMsi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
|
||||
|
||||
[Files_install]
|
||||
; copy the ini file to the InstallDir
|
||||
copy "$IniCfgFile$" "$InstallDir$"
|
||||
|
||||
; Example of recursively copying some files into the installation directory:
|
||||
;
|
||||
; copy -s "%ScriptPath%\files\*.*" "$InstallDir$"
|
||||
|
@ -6,15 +6,15 @@
|
||||
[Actions]
|
||||
requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
DefVar $MsiId$
|
||||
DefVar $MsiIdHelp$
|
||||
; DefVar $MsiId$
|
||||
DefVar $MsiIdOld$
|
||||
DefVar $MsiIdHelpOld$
|
||||
DefVar $MsiIdOldHelpDe$
|
||||
DefVar $LogDir$
|
||||
DefVar $IniFile$
|
||||
DefVar $IniCfgFile$
|
||||
DefVar $ExitCode$
|
||||
DefVar $ProductId$
|
||||
DefVar $InstallDir$
|
||||
DefVar $InstallDirOld$
|
||||
|
||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
|
||||
@ -33,7 +33,6 @@ Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
; ----------------------------------------------------------------
|
||||
Set $ProductId$ = "documentfoundation.libreoffice"
|
||||
Set $InstallDir$ = "%ProgramFiles32Dir%\LibreOffice 3.5"
|
||||
Set $InstallDirOld$ = "%ProgramFiles32Dir%\LibreOffice 3.4"
|
||||
; ----------------------------------------------------------------
|
||||
|
||||
|
||||
|
@ -24,8 +24,14 @@ DL_WINST_NAME[1]=InstallMsi
|
||||
DL_FILE[2]="LibO_${VERSION}_Win_x86_helppack_de.msi"
|
||||
DL_SOURCE[2]="http://download.documentfoundation.org/libreoffice/stable/${VERSION}/win/x86/LibO_${VERSION}_Win_x86_helppack_de.msi"
|
||||
DL_ARCH[2]="X86"
|
||||
DL_WINST_NAME[2]=InstallHelpMsi
|
||||
DL_WINST_NAME[2]=InstallHelpDeMsi
|
||||
|
||||
# File array index for the image showing while installing the program
|
||||
ICON_DL_INDEX=0
|
||||
|
||||
WINST_NAME[0]="MsiId"
|
||||
WINST_VALUE[0]="{28C70D19-6DE9-43EF-BFA3-342F4A11B727}"
|
||||
|
||||
WINST_NAME[0]="MsiIdHelpDe"
|
||||
WINST_VALUE[0]="{D010EBB6-6CDB-4360-90ED-743156F3E11F}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user