Start Cleanup and add license support

This commit is contained in:
Mario Fetka 2012-02-25 07:52:24 +01:00
parent 664b9bc3e9
commit f9a1dcb8ba
4 changed files with 23 additions and 9 deletions

View File

@ -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
;

View File

@ -1,5 +1,8 @@
<config>
<agent>
<license>
<key>00000-00000-00000-00000-00000</key>
</license>
<initialscan>0</initialscan>
<agent_registered>0</agent_registered>
<scansettings>

View File

@ -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

View File

@ -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$
; ----------------------------------------------------------------