From f9a1dcb8ba67623f9c20d5ac8aa337fd22f50cd2 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sat, 25 Feb 2012 07:52:24 +0100 Subject: [PATCH] Start Cleanup and add license support --- CLIENT_DATA/delsub.ins | 9 ++------- CLIENT_DATA/local.xml | 3 +++ CLIENT_DATA/setup.ins | 18 +++++++++++++++++- CLIENT_DATA/uninstall.ins | 2 +- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/CLIENT_DATA/delsub.ins b/CLIENT_DATA/delsub.ins index ea6e9bd..fef6a9e 100644 --- a/CLIENT_DATA/delsub.ins +++ b/CLIENT_DATA/delsub.ins @@ -15,13 +15,11 @@ Set $RealUninstallProgram32$ = $InstallDir64$ + "\" + $uVersion$ + "\immunet-uni if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") Message "Uninstalling " + $ProductId$ + " 32 Bit..." - comment "Stop Immunet Service" - Dosbatch_stop_immunet - 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") = "") @@ -46,6 +44,7 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe 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") = "") @@ -64,10 +63,6 @@ comment "Delete program shortcuts" LinkFolder_uninstall -[Dosbatch_stop_immunet] -net stop immunetprotect -taskkill /IM iptray.exe - [Dosbatch_uninstall_32] ; Choose one of the following examples as basis for program uninstall ; diff --git a/CLIENT_DATA/local.xml b/CLIENT_DATA/local.xml index a508b13..9b40f29 100644 --- a/CLIENT_DATA/local.xml +++ b/CLIENT_DATA/local.xml @@ -1,5 +1,8 @@ + + 00000-00000-00000-00000-00000 + 0 0 diff --git a/CLIENT_DATA/setup.ins b/CLIENT_DATA/setup.ins index 36ed365..37a3cbb 100644 --- a/CLIENT_DATA/setup.ins +++ b/CLIENT_DATA/setup.ins @@ -71,7 +71,7 @@ Set $MinimumSpace$ = "50 MB" ; the path were we find the product after the installation Set $InstallDir32$ = "%ProgramFiles32Dir%\Immunet" Set $InstallDir64$ = "%ProgramFiles64Dir%\Immunet" -Set $LicenseRequired$ = "false" +Set $LicenseRequired$ = "true" Set $LicensePool$ = "p_" + $ProductId$ ; ---------------------------------------------------------------- @@ -181,6 +181,10 @@ else LinkFolder_install comment "Stop Immunet Service" Dosbatch_stop_immunet + comment "Set license key" + Dosbatch_config_agent_license_key_32 + + if ($agent_scansettings_clamav_devInit$ = "1") Dosbatch_agent_scansettings_clamav_devInit_32 endif @@ -271,6 +275,9 @@ else LinkFolder_install comment "Stop Immunet Service" Dosbatch_stop_immunet + comment "Set license key" + Dosbatch_config_agent_license_key_64 + if ($agent_scansettings_clamav_devInit$ = "1") Dosbatch_agent_scansettings_clamav_devInit_64 endif @@ -359,6 +366,10 @@ taskkill /IM iptray.exe net start immunetprotect +[Dosbatch_config_agent_license_key_32] +copy $InstallDir32$\local.xml $InstallDir32$\local.xml.old +xml ed -O -u "/config/agent/license/key" -v $LicenseKey$ $InstallDir32$\local.xml.old > $InstallDir32$\local.xml + [Dosbatch_agent_scansettings_clamav_devInit_32] copy $InstallDir32$\local.xml $InstallDir32$\local.xml.old xml ed -O -u "/config/agent/scansettings/clamav/defInit" -v $agent_scansettings_clamav_devInit$ $InstallDir32$\local.xml.old > $InstallDir32$\local.xml @@ -437,6 +448,11 @@ xml ed -O -u "/config/ui/notification/cloud" -v $ui_notification_cloud$ $Install + +[Dosbatch_config_agent_license_key_64] +copy $InstallDir64$\local.xml $InstallDir64$\local.xml.old +xml ed -O -u "/config/agent/license/key" -v $LicenseKey$ $InstallDir64$\local.xml.old > $InstallDir64$\local.xml + [Dosbatch_agent_scansettings_clamav_devInit_64] copy $InstallDir64$\local.xml $InstallDir64$\local.xml.old xml ed -O -u "/config/agent/scansettings/clamav/defInit" -v $agent_scansettings_clamav_devInit$ $InstallDir64$\local.xml.old > $InstallDir64$\local.xml diff --git a/CLIENT_DATA/uninstall.ins b/CLIENT_DATA/uninstall.ins index e0b20fa..5bd79e6 100644 --- a/CLIENT_DATA/uninstall.ins +++ b/CLIENT_DATA/uninstall.ins @@ -44,7 +44,7 @@ Set $LogDir$ = "%SystemDrive%\tmp" Set $ProductId$ = "immunet" Set $InstallDir32$ = "%ProgramFiles32Dir%\Immunet" Set $InstallDir64$ = "%ProgramFiles64Dir%\Immunet" -Set $LicenseRequired$ = "false" +Set $LicenseRequired$ = "true" Set $LicensePool$ = "p_" + $ProductId$ ; ----------------------------------------------------------------