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]
requiredWinstVersion >= "4.10.8.6"
DefVar $MsiId32$
; DefVar $MsiId32$
DefVar $MsiIdOld32$
DefVar $UninstallProgram32$
DefVar $RealUninstallProgram32$
DefVar $MsiId64$
DefVar $OldUninstallProgram32$
DefVar $IniFile32$
; DefVar $MsiId64$
DefVar $MsiIdOld64$
DefVar $UninstallProgram64$
DefVar $RealUninstallProgram64$
DefVar $OldUninstallProgram64$
DefVar $IniFile64$
DefVar $IniCfgFile$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
@ -60,21 +65,6 @@ DefVar $ui_notification_cloud$
;
@@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 "description: No Windows Tour"
Set $agent_scansettings_clamav_devInit$ = GetProductProperty("agent_scansettings_clamav_devInit", "1")
@ -147,6 +137,21 @@ comment "Flag_NoWindowsTour"
comment "description: No Windows Tour"
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$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
@ -156,9 +161,9 @@ else
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
if FileExists("%ScriptPath%\delsub.ins")
if FileExists("%ScriptPath%\delsub3264.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub.ins"
Sub "%ScriptPath%\delsub3264.ins"
endif
if $LicenseRequired$ = "true"
@ -259,7 +264,6 @@ else
comment "Start Immunet Service"
Dosbatch_start_immunet
endif
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"
Dosbatch_start_immunet
endif
endif
[Dosbatch_stop_immunet]
net stop immunetprotect
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
xml ed -O -u "/config/ui/notification/cloud" -v $ui_notification_cloud$ $InstallDir64$\local.xml.old > $InstallDir64$\local.xml
[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
[Files_install_32]
; Example of recursively copying some files into the installation directory:
;
copy "$IniCfgFile$" "$InstallDir32$"
copy -s "%ScriptPath%\*.xml" "$InstallDir32$"
copy -s "%ScriptPath%\immunet-uninstall.exe" "$InstallDir32$\$uVersion$"
[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
[Files_install_64]
; Example of recursively copying some files into the installation directory:
;
copy "$IniCfgFile$" "$InstallDir64$"
copy -s "%ScriptPath%\*.xml" "$InstallDir64$"
copy -s "%ScriptPath%\immunet-uninstall.exe" "$InstallDir64$\$uVersion$"
[Registry_install]
; Example of setting some values of an registry key:
@ -601,43 +589,37 @@ copy -s "%ScriptPath%\immunet-uninstall.exe" "$InstallDir64$\$uVersion$"
; end_link
[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"
Set $LicenseKey$ = demandLicenseKey ($LicensePool$)
; If there is an assignment of exactly one licensepool to the product the following call is possible:
; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$)
;
; If there is an assignment of a license pool to a windows software id, it is possible to use:
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$)
DefVar $ServiceErrorClass$
set $ServiceErrorClass$ = getLastServiceErrorClass
comment "Error class: " + $ServiceErrorClass$
if $ServiceErrorClass$ = "None"
comment "Everything fine, we got the license key '" + $LicenseKey$ + "'"
else
if $ServiceErrorClass$ = "LicenseConfigurationError"
LogError "Fatal: license configuration must be corrected"
LogError getLastServiceErrorMessage
comment "Trying to get a license key"
Set $LicenseKey$ = demandLicenseKey ($LicensePool$)
; If there is an assignment of exactly one licensepool to the product the following call is possible:
; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$)
;
; If there is an assignment of a license pool to a windows software id, it is possible to use:
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$)
DefVar $ServiceErrorClass$
set $ServiceErrorClass$ = getLastServiceErrorClass
comment "Error class: " + $ServiceErrorClass$
if $ServiceErrorClass$ = "None"
comment "Everything fine, we got the license key '" + $LicenseKey$ + "'"
else
if $ServiceErrorClass$ = "LicenseConfigurationError"
LogError "Fatal: license configuration must be corrected"
LogError getLastServiceErrorMessage
isFatalError
else
if $ServiceErrorClass$ = "LicenseMissingError"
LogError "Fatal: required license is not supplied"
isFatalError
else
if $ServiceErrorClass$ = "LicenseMissingError"
LogError "Fatal: required license is not supplied"
isFatalError
endif
endif
endif
else
LogError "Fatal: license required, but license management not enabled"
isFatalError
endif
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
@ -667,3 +649,8 @@ else
endif
endif

View File

@ -6,12 +6,17 @@
[Actions]
requiredWinstVersion >= "4.10.8.6"
DefVar $MsiId32$
; DefVar $MsiId32$
DefVar $MsiIdOld32$
DefVar $UninstallProgram32$
DefVar $RealUninstallProgram32$
DefVar $MsiId64$
DefVar $OldUninstallProgram32$
DefVar $IniFile32$
; DefVar $MsiId64$
DefVar $MsiIdOld64$
DefVar $UninstallProgram64$
DefVar $RealUninstallProgram64$
DefVar $OldUninstallProgram64$
DefVar $IniFile64$
DefVar $IniCfgFile$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
@ -42,8 +47,8 @@ Set $LogDir$ = "%SystemDrive%\tmp"
; - Please edit the following values -
; ----------------------------------------------------------------
Set $ProductId$ = "sourcefire.immunet"
Set $InstallDir32$ = "%ProgramFiles32Dir%\Immunet"
Set $InstallDir64$ = "%ProgramFiles64Dir%\Immunet"
Set $InstallDir32$ = "%ProgramFiles32Dir%\Immunet"
Set $InstallDir64$ = "%ProgramFiles64Dir%\Immunet"
Set $LicenseRequired$ = "true"
Set $LicensePool$ = "p_" + $ProductId$
; ----------------------------------------------------------------
@ -54,9 +59,9 @@ ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
Message "Uninstalling " + $ProductId$ + " ..."
if FileExists("%ScriptPath%\delsub.ins")
if FileExists("%ScriptPath%\delsub3264.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub.ins"
Sub "%ScriptPath%\delsub3264.ins"
endif
if $LicenseRequired$ = "true"
@ -65,23 +70,17 @@ if $LicenseRequired$ = "true"
endif
[Sub_free_license]
if opsiLicenseManagementEnabled
comment "License management is enabled and will be used"
comment "Trying to free license used for the product"
DefVar $result$
Set $result$ = FreeLicense($LicensePool$)
; If there is an assignment of a license pool to the product, it is possible to use
; Set $result$ = FreeLicense("", $ProductId$)
;
; If there is an assignment of a license pool to a windows software id, it is possible to use
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)
else
LogError "Error: licensing required, but license management not enabled"
isFatalError
endif
comment "License management is enabled and will be used"
comment "Trying to free license used for the product"
DefVar $result$
Set $result$ = FreeLicense($LicensePool$)
; If there is an assignment of a license pool to the product, it is possible to use
; Set $result$ = FreeLicense("", $ProductId$)
;
; If there is an assignment of a license pool to a windows software id, it is possible to use
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)

View File

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

View File

@ -29,9 +29,24 @@ DL_WINST_NAME[2]=Install64Exe
# File array index for the image showing while installing the program
ICON_DL_INDEX=0
WINST_NAME[0]="uOldVersion"
WINST_VALUE[0]="3.0.5"
WINST_NAME[0]="uVersion"
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.