New way to handle immunet uninstall even with manually installed versions (starting with 3.0.5)2

This commit is contained in:
Mario Fetka 2012-05-16 23:05:19 +02:00
parent 22477b5ffa
commit 6b403a89db
10 changed files with 421 additions and 259 deletions

Binary file not shown.

View File

@ -1,157 +0,0 @@
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/
Set $MsiId32$ = '{A6EE99EA-420C-4FA6-8A7C-FDB60D278855}'
Set $UninstallProgram32$ = $InstallDir32$ + "\" + $uVersion$ + "\uninstall.exe"
Set $RealUninstallProgram32$ = $InstallDir32$ + "\" + $uVersion$ + "\immunet-uninstall.exe"
Set $MsiId64$ = '{XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXXXX}'
Set $UninstallProgram32$ = $InstallDir64$ + "\" + $uVersion$ + "\uninstall.exe"
Set $RealUninstallProgram32$ = $InstallDir64$ + "\" + $uVersion$ + "\immunet-uninstall.exe"
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Message "Uninstalling " + $ProductId$ + " 32 Bit..."
if FileExists($RealUninstallProgram32$)
comment "Uninstall program found, starting uninstall"
Dosbatch_realuninstall_32
sub_check_exitcode
ExitWindows /ImmediateReboot
endif
if FileExists($UninstallProgram32$)
comment "Uninstall program found, starting uninstall"
Dosbatch_uninstall_32
sub_check_exitcode
ExitWindows /ImmediateReboot
endif
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi_32
sub_check_exitcode
endif
comment "Delete files"
Files_uninstall_32 /32Bit
comment "Cleanup registry"
Registry_uninstall /32Bit
endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Message "Uninstalling " + $ProductId$ + " 64 Bit..."
comment "Stop Immunet Service"
Dosbatch_stop_immunet
if FileExists($RealUninstallProgram64$)
comment "Uninstall program found, starting uninstall"
Dosbatch_realuninstall_64
sub_check_exitcode
ExitWindows /ImmediateReboot
endif
if FileExists($UninstallProgram64$)
comment "Uninstall program found, starting uninstall"
Dosbatch_uninstall_64
sub_check_exitcode
ExitWindows /ImmediateReboot
endif
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "")
comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi_64
sub_check_exitcode
endif
comment "Delete files"
Files_uninstall_64 /64Bit
comment "Cleanup registry"
Registry_uninstall /64Bit
endif
comment "Delete program shortcuts"
LinkFolder_uninstall
[Dosbatch_realuninstall_32]
cd $InstallDir32$\$uVersion$
"$RealUninstallProgram32$"
[Dosbatch_uninstall_32]
"$UninstallProgram32$"
[Winbatch_uninstall_msi_32]
msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress
[Files_uninstall_32]
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
;
delete -sf "$InstallDir32$\"
[Dosbatch_realuninstall_64]
cd $InstallDir64$\$uVersion$
"$RealUninstallProgram64$"
[Dosbatch_uninstall_64]
"$UninstallProgram64$"
[Winbatch_uninstall_msi_64]
msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress
[Files_uninstall_64]
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
;
delete -sf "$InstallDir64$\"
[Registry_uninstall]
; Example of deleting a registry key:
;
; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
[LinkFolder_uninstall]
; Example of deleting a folder from AllUsers startmenu:
;
; set_basefolder common_programs
; delete_subfolder $ProductId$
;
; Example of deleting a shortcut from AllUsers desktop:
;
; set_basefolder common_desktopdirectory
; set_subfolder ""
; delete_element $ProductId$
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif

308
CLIENT_DATA/delsub3264.ins Normal file
View File

@ -0,0 +1,308 @@
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/
Set $UninstallProgram32$ = $InstallDir32$ + $uVersion$ + "\uninstall.exe"
Set $UninstallProgram64$ = $InstallDir64$ + $uVersion$ + "\uninstall.exe"
Set $OldUninstallProgram32$ = $InstallDir32$ + $OlduVersion32$ + "\uninstall.exe"
Set $OldUninstallProgram64$ = $InstallDir64$ + $OlduVersion64$ + "\uninstall.exe"
Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini"
Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini"
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Message "Uninstalling " + $ProductId$ + " 32 Bit..."
if FileExists($IniFile32$)
Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
Set $OlduVersion32$ = GetValueFromInifile($IniFile32$,"COMMON","uVersion","0.0.0")
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld32$ + "] DisplayName") = "")
comment "Old MSI id " + $MsiIdOld32$ + " found in registry, starting msiexec to uninstall old version"
Winbatch_uninstall_msi_old_32
sub_check_exitcode
endif
Set $OldUninstallProgram32$ = $InstallDir32$ + $OlduVersion32$ + "\uninstall.exe"
endif
if FileExists($OldUninstallProgram32$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_old_32
sub_check_exitcode
endif
if FileExists($UninstallProgram32$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_32
sub_check_exitcode
endif
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi_32
sub_check_exitcode
endif
comment "Delete files"
Files_uninstall_32 /32Bit
comment "Cleanup registry"
Registry_uninstall /32Bit
endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Message "Uninstalling " + $ProductId$ + " 64 Bit..."
if FileExists($IniFile64$)
Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
Set $OlduVersion64$ = GetValueFromInifile($IniFile64$,"COMMON","uVersion","0.0.0")
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld64$ + "] DisplayName") = "")
comment "Old MSI id " + $MsiIdOld64$ + " found in registry, starting msiexec to uninstall old version"
Winbatch_uninstall_msi_old_64
sub_check_exitcode
endif
Set $OldUninstallProgram64$ = $InstallDir64$ + $OlduVersion64$ + "\uninstall.exe"
endif
if FileExists($OldUninstallProgram64$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_old_64
sub_check_exitcode
endif
if FileExists($UninstallProgram64$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_64
sub_check_exitcode
endif
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "")
comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi_64
sub_check_exitcode
endif
comment "Delete files"
Files_uninstall_64 /64Bit
comment "Cleanup registry"
Registry_uninstall /64Bit
endif
comment "Delete program shortcuts"
LinkFolder_uninstall
[Winbatch_uninstall_old_32]
"$RealUninstallProgramm32$" "$OldUninstallProgram32$"
[Winbatch_uninstall_32]
"$RealUninstallProgramm32$" "$UninstallProgram32$"
[Winbatch_uninstall_msi_old_32]
msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress
[Winbatch_uninstall_msi_32]
msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress
[Files_uninstall_32]
delete -sf "$InstallDir32$\"
[Winbatch_uninstall_old_64]
"$RealUninstallProgramm64$" "$OldUninstallProgram64$"
[Winbatch_uninstall_64]
"$RealUninstallProgramm64$" "$UninstallProgram64$"
[Winbatch_uninstall_msi_old_64]
msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
[Winbatch_uninstall_msi_64]
msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress
[Files_uninstall_64]
delete -sf "$InstallDir64$\"
[Registry_uninstall]
; Example of deleting a registry key:
;
; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
[LinkFolder_uninstall]
; Example of deleting a folder from AllUsers startmenu:
;
; set_basefolder common_programs
; delete_subfolder $ProductId$
;
; Example of deleting a shortcut from AllUsers desktop:
;
; set_basefolder common_desktopdirectory
; set_subfolder ""
; delete_element $ProductId$
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif
------------------------------------
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/
Set $MsiId32$ = '{A6EE99EA-420C-4FA6-8A7C-FDB60D278855}'
Set $UninstallProgram32$ = $InstallDir32$ + "\" + $uVersion$ + "\uninstall.exe"
Set $MsiId64$ = '{XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXXXX}'
Set $UninstallProgram32$ = $InstallDir64$ + "\" + $uVersion$ + "\uninstall.exe"
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Message "Uninstalling " + $ProductId$ + " 32 Bit..."
if FileExists($UninstallProgram32$)
comment "Uninstall program found, starting uninstall"
Dosbatch_uninstall_32
sub_check_exitcode
ExitWindows /ImmediateReboot
endif
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi_32
sub_check_exitcode
endif
comment "Delete files"
Files_uninstall_32 /32Bit
comment "Cleanup registry"
Registry_uninstall /32Bit
endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Message "Uninstalling " + $ProductId$ + " 64 Bit..."
comment "Stop Immunet Service"
Dosbatch_stop_immunet
if FileExists($UninstallProgram64$)
comment "Uninstall program found, starting uninstall"
Dosbatch_uninstall_64
sub_check_exitcode
ExitWindows /ImmediateReboot
endif
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "")
comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi_64
sub_check_exitcode
endif
comment "Delete files"
Files_uninstall_64 /64Bit
comment "Cleanup registry"
Registry_uninstall /64Bit
endif
comment "Delete program shortcuts"
LinkFolder_uninstall
;[Dosbatch_uninstall_32]
;"$UninstallProgram32$"
[Winbatch_uninstall_msi_32]
msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress
[Files_uninstall_32]
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
;
delete -sf "$InstallDir32$\"
;[Dosbatch_uninstall_64]
;"$UninstallProgram64$"
[Winbatch_uninstall_msi_64]
msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress
[Files_uninstall_64]
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
;
delete -sf "$InstallDir64$\"
[Registry_uninstall]
; Example of deleting a registry key:
;
; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
[LinkFolder_uninstall]
; Example of deleting a folder from AllUsers startmenu:
;
; set_basefolder common_programs
; delete_subfolder $ProductId$
;
; Example of deleting a shortcut from AllUsers desktop:
;
; set_basefolder common_desktopdirectory
; set_subfolder ""
; delete_element $ProductId$
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif

View File

@ -0,0 +1,10 @@
[X86]
MsiId32={A6EE99EA-420C-4FA6-8A7C-FDB60D278855}
[X86_64]
MsiId64={82CD33B2-1DE6-4663-B6F0-1592B2376F78}
[COMMON]
PN=sourcefire.immunet
VERSION=3.0.6.8466
uVersion=3.0.6

View File

@ -6,12 +6,17 @@
[Actions] [Actions]
requiredWinstVersion >= "4.10.8.6" requiredWinstVersion >= "4.10.8.6"
DefVar $MsiId32$ ; DefVar $MsiId32$
DefVar $MsiIdOld32$
DefVar $UninstallProgram32$ DefVar $UninstallProgram32$
DefVar $RealUninstallProgram32$ DefVar $OldUninstallProgram32$
DefVar $MsiId64$ DefVar $IniFile32$
; DefVar $MsiId64$
DefVar $MsiIdOld64$
DefVar $UninstallProgram64$ DefVar $UninstallProgram64$
DefVar $RealUninstallProgram64$ DefVar $OldUninstallProgram64$
DefVar $IniFile64$
DefVar $IniCfgFile$
DefVar $LogDir$ DefVar $LogDir$
DefVar $ProductId$ DefVar $ProductId$
DefVar $MinimumSpace$ DefVar $MinimumSpace$
@ -60,21 +65,6 @@ DefVar $ui_notification_cloud$
; ;
@@BUILDER_VARIABLES@@ @@BUILDER_VARIABLES@@
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$ = "sourcefire.immunet"
Set $MinimumSpace$ = "50 MB"
; the path were we find the product after the installation
Set $InstallDir32$ = "%ProgramFiles32Dir%\Immunet"
Set $InstallDir64$ = "%ProgramFiles64Dir%\Immunet"
Set $LicenseRequired$ = "true"
Set $LicensePool$ = "p_" + $ProductId$
; ----------------------------------------------------------------
comment "Flag_NoWindowsTour" comment "Flag_NoWindowsTour"
comment "description: No Windows Tour" comment "description: No Windows Tour"
Set $agent_scansettings_clamav_devInit$ = GetProductProperty("agent_scansettings_clamav_devInit", "1") Set $agent_scansettings_clamav_devInit$ = GetProductProperty("agent_scansettings_clamav_devInit", "1")
@ -147,6 +137,21 @@ comment "Flag_NoWindowsTour"
comment "description: No Windows Tour" comment "description: No Windows Tour"
Set $ui_notification_cloud$ = GetProductProperty("ui_notification_cloud", "1") Set $ui_notification_cloud$ = GetProductProperty("ui_notification_cloud", "1")
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$ = "sourcefire.immunet"
Set $MinimumSpace$ = "100 MB"
; the path were we find the product after the installation
Set $InstallDir32$ = "%ProgramFiles32Dir%\Immunet"
Set $InstallDir64$ = "%ProgramFiles64Dir%\Immunet"
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
Set $LicenseRequired$ = "true"
Set $LicensePool$ = "p_" + $ProductId$
; ----------------------------------------------------------------
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
@ -156,9 +161,9 @@ else
comment "Show product picture" comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
if FileExists("%ScriptPath%\delsub.ins") if FileExists("%ScriptPath%\delsub3264.ins")
comment "Start uninstall sub section" comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub.ins" Sub "%ScriptPath%\delsub3264.ins"
endif endif
if $LicenseRequired$ = "true" if $LicenseRequired$ = "true"
@ -259,7 +264,6 @@ else
comment "Start Immunet Service" comment "Start Immunet Service"
Dosbatch_start_immunet Dosbatch_start_immunet
endif endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
@ -352,12 +356,10 @@ else
comment "Start Immunet Service" comment "Start Immunet Service"
Dosbatch_start_immunet Dosbatch_start_immunet
endif endif
endif endif
[Dosbatch_stop_immunet] [Dosbatch_stop_immunet]
net stop immunetprotect net stop immunetprotect
taskkill /IM iptray.exe taskkill /IM iptray.exe
@ -529,34 +531,20 @@ xml ed -O -u "/config/ui/notification/gaming" -v $ui_notification_gaming$ $Insta
copy $InstallDir64$\local.xml $InstallDir64$\local.xml.old copy $InstallDir64$\local.xml $InstallDir64$\local.xml.old
xml ed -O -u "/config/ui/notification/cloud" -v $ui_notification_cloud$ $InstallDir64$\local.xml.old > $InstallDir64$\local.xml xml ed -O -u "/config/ui/notification/cloud" -v $ui_notification_cloud$ $InstallDir64$\local.xml.old > $InstallDir64$\local.xml
[Winbatch_install_32] [Winbatch_install_32]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
;
; === Nullsoft Scriptable Install System ================================================================
"$Install32Exe$" /S "$Install32Exe$" /S
[Files_install_32] [Files_install_32]
; Example of recursively copying some files into the installation directory: copy "$IniCfgFile$" "$InstallDir32$"
;
copy -s "%ScriptPath%\*.xml" "$InstallDir32$" copy -s "%ScriptPath%\*.xml" "$InstallDir32$"
copy -s "%ScriptPath%\immunet-uninstall.exe" "$InstallDir32$\$uVersion$"
[Winbatch_install_64] [Winbatch_install_64]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
;
; === MSI package =======================================================================================
; You may use the parameter PIDKEY=$Licensekey$
"$Install64Exe$" /S "$Install64Exe$" /S
[Files_install_64] [Files_install_64]
; Example of recursively copying some files into the installation directory: copy "$IniCfgFile$" "$InstallDir64$"
;
copy -s "%ScriptPath%\*.xml" "$InstallDir64$" copy -s "%ScriptPath%\*.xml" "$InstallDir64$"
copy -s "%ScriptPath%\immunet-uninstall.exe" "$InstallDir64$\$uVersion$"
[Registry_install] [Registry_install]
; Example of setting some values of an registry key: ; Example of setting some values of an registry key:
@ -601,7 +589,6 @@ copy -s "%ScriptPath%\immunet-uninstall.exe" "$InstallDir64$\$uVersion$"
; end_link ; end_link
[Sub_get_licensekey] [Sub_get_licensekey]
if opsiLicenseManagementEnabled
comment "License management is enabled and will be used" comment "License management is enabled and will be used"
comment "Trying to get a license key" comment "Trying to get a license key"
@ -632,11 +619,6 @@ if opsiLicenseManagementEnabled
endif endif
endif endif
endif endif
else
LogError "Fatal: license required, but license management not enabled"
isFatalError
endif
[Sub_check_exitcode] [Sub_check_exitcode]
comment "Test for installation success via exit code" comment "Test for installation success via exit code"
@ -667,3 +649,8 @@ else
endif endif
endif endif

View File

@ -6,12 +6,17 @@
[Actions] [Actions]
requiredWinstVersion >= "4.10.8.6" requiredWinstVersion >= "4.10.8.6"
DefVar $MsiId32$ ; DefVar $MsiId32$
DefVar $MsiIdOld32$
DefVar $UninstallProgram32$ DefVar $UninstallProgram32$
DefVar $RealUninstallProgram32$ DefVar $OldUninstallProgram32$
DefVar $MsiId64$ DefVar $IniFile32$
; DefVar $MsiId64$
DefVar $MsiIdOld64$
DefVar $UninstallProgram64$ DefVar $UninstallProgram64$
DefVar $RealUninstallProgram64$ DefVar $OldUninstallProgram64$
DefVar $IniFile64$
DefVar $IniCfgFile$
DefVar $LogDir$ DefVar $LogDir$
DefVar $ExitCode$ DefVar $ExitCode$
DefVar $ProductId$ DefVar $ProductId$
@ -54,9 +59,9 @@ ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
Message "Uninstalling " + $ProductId$ + " ..." Message "Uninstalling " + $ProductId$ + " ..."
if FileExists("%ScriptPath%\delsub.ins") if FileExists("%ScriptPath%\delsub3264.ins")
comment "Start uninstall sub section" comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub.ins" Sub "%ScriptPath%\delsub3264.ins"
endif endif
if $LicenseRequired$ = "true" if $LicenseRequired$ = "true"
@ -65,7 +70,6 @@ if $LicenseRequired$ = "true"
endif endif
[Sub_free_license] [Sub_free_license]
if opsiLicenseManagementEnabled
comment "License management is enabled and will be used" comment "License management is enabled and will be used"
comment "Trying to free license used for the product" comment "Trying to free license used for the product"
@ -78,10 +82,5 @@ if opsiLicenseManagementEnabled
; DefVar $WindowsSoftwareId$ ; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..." ; $WindowsSoftwareId$ = "..."
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$) ; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)
else
LogError "Error: licensing required, but license management not enabled"
isFatalError
endif

View File

@ -13,8 +13,8 @@ version: VERSION
priority: PRIORITY priority: PRIORITY
licenseRequired: False licenseRequired: False
productClasses: productClasses:
setupScript: setup.ins setupScript: setup3264.ins
uninstallScript: uninstall.ins uninstallScript: uninstall3264.ins
updateScript: updateScript:
alwaysScript: alwaysScript:
onceScript: onceScript:

View File

@ -29,9 +29,24 @@ DL_WINST_NAME[2]=Install64Exe
# 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]="uOldVersion"
WINST_VALUE[0]="3.0.5"
WINST_NAME[0]="uVersion" WINST_NAME[0]="uVersion"
WINST_VALUE[0]="3.0.6" WINST_VALUE[0]="3.0.6"
WINST_NAME[1]="MsiId32"
WINST_VALUE[1]="{A6EE99EA-420C-4FA6-8A7C-FDB60D278855}"
WINST_NAME[2]="MsiId64"
WINST_VALUE[2]="{82CD33B2-1DE6-4663-B6F0-1592B2376F78}"
WINST_NAME[3]="RealUninstallProgramm32"
WINST_VALUE[3]="@DL_EXTRACT_WINST_PATH[1]@\\immunet-uninstall32.exe"
WINST_NAME[4]="RealUninstallProgramm64"
WINST_VALUE[4]="@DL_EXTRACT_WINST_PATH[2]@\\immunet-uninstall64.exe"
WINST_NAME[5]="OlduVersion32"
WINST_VALUE[5]="3.0.5"
WINST_NAME[6]="OlduVersion64"
WINST_VALUE[6]="3.0.5"

Binary file not shown.