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