home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
gimli.bioss.sari.ac.uk
/
gimli.bioss.sari.ac.uk.zip
/
gimli.bioss.sari.ac.uk
/
pub
/
misc
/
McAfee8.7.Zip
/
ePOPolicyMigration.exe
/
CABFILE
/
1
/
85To87_Policy_Upgrade_Script.sql
< prev
next >
Wrap
Text File
|
2007-10-05
|
74KB
|
2,308 lines
-------------------------------------------------------------------------------
------------ V S E 8 . 5 T O 8 . 7 P O L I C Y U P G R A D E -----------
-------------------------------------------------------------------------------
if exists (select * from tempdb..sysobjects where name like '#VirusScanPolicyIDs%')
drop table #VirusScanPolicyIDs
go
/* ----------------------------------------------------------------------------
Copy over 8.5.0 policies to 8.7.0 policies only if non global 8.7.0 policies
don't exist.
---------------------------------------------------------------------------- */
if not exists (select * from PolicySettings, Policy
where PolicySettings.ParentID = Policy.AutoID
and ProductCode = 'VIRUSCAN8700' and parentType != 7)
begin
/* ----------------------------------------------------------------------------
Copy all non global policy table 8.5.0 policies to 8.7.0 policies.
---------------------------------------------------------------------------- */
insert Policy
(ParentID, ParentType, ProductCode)
select ParentID, ParentType, 'VIRUSCAN8700'
from Policy
where
Policy.ProductCode = 'VIRUSCAN8600'
and Policy.ParentType in (6, 5, 4, 3, 1)
/* ----------------------------------------------------------------------------
Get policy.autoids of all 8.5.0 and 8.7.0 policies.
---------------------------------------------------------------------------- */
select a.AutoID as AutoID2, b.AutoID as AutoID3
into #VirusScanPolicyIDs
from Policy a, Policy b
where
a.ProductCode = 'VIRUSCAN8600'
and b.ProductCode = 'VIRUSCAN8700'
and a.ParentType = b.ParentType
and a.ParentID = b.ParentID
and a.ParentType in (6, 5, 4, 3, 1)
/* ----------------------------------------------------------------------------
Copy all non global PolicySetting from 8.5.0 policy settings to 8.7.0 policy
settings.
---------------------------------------------------------------------------- */
insert PolicySettings
(ParentID, SectionName, SettingName, Value)
select #VirusScanPolicyIDs.AutoID3, SectionName, SettingName, Value
from PolicySettings, #VirusScanPolicyIDs
where
PolicySettings.ParentID = #VirusScanPolicyIDs.AutoID2
/* ----------------------------------------------------------------------------
Change the SectionName and/or the SettingName of the policies that have moved.
A "-" sign indicates that the value is no longer used and is to be deleted only.
OLD VALUE: NEW VALUE:
[Trusted-Action] [Trusted-Action]
uAction = 1 => = 7 (Deny)
uAction = 6 => = 1 (Continue)
uSecAction = 1 => = 7 (Deny)
uSecAction = 6 => = 1 (Continue)
[Untrusted-Action] [Untrusted-Action]
uAction = 1 => = 7 (Deny)
uAction = 6 => = 1 (Continue)
uSecAction = 1 => = 7 (Deny)
uSecAction = 6 => = 1 (Continue)
[Default-Action] [Default-Action]
uAction = 1 => = 7 (Deny)
uAction = 6 => = 1 (Continue)
uSecAction = 1 => = 7 (Deny)
uSecAction = 6 => = 1 (Continue)
[Trusted-Spyware] [Trusted-Spyware]
uAction_Program = 1 => = 7 (Deny)
uAction_Program = 6 => = 1 (Continue)
uSecAction_Program = 1 => = 7 (Deny)
uSecAction_Program = 6 => = 1 (Continue)
[Untrusted-Spyware] [Untrusted-Spyware]
uAction_Program = 1 => = 7 (Deny)
uAction_Program = 6 => = 1 (Continue)
uSecAction_Program = 1 => = 7 (Deny)
uSecAction_Program = 6 => = 1 (Continue)
[Default-Spyware] [Default-Spyware]
uAction_Program = 1 => = 7 (Deny)
uAction_Program = 6 => = 1 (Continue)
uSecAction_Program = 1 => = 7 (Deny)
uSecAction_Program = 6 => = 1 (Continue)
[EmailAction] [EmailAction]
dwPromptButton => |= 0x00000020 (Delete Mail)
[Server_EntExclItems]
-EnterceptExclusionModule_
[Server_EntExclItems]
-EnterceptExclusionAPI_
[Trusted-Action] [Trusted-Action]
uAction = 3 (Move) => = 4 (Delete)
uSecAction => = 7 (Deny)
[Trusted-Action] [Trusted-Action]
uAction = 5 (Clean)
uSecAction = 3 (Move) => = 4 (Delete)
[Trusted-Action] [Trusted-Action]
uAction = 4 (Delete)
uSecAction = 3 (Move) => = 7 (Deny)
[Trusted-Spyware] [Trusted-Spyware]
uAction_Program = 3 (Move) => = 4 (Delete)
uSecAction_Program = 4 (Delete) => = 7 (Deny)
[Trusted-Spyware] [Trusted-Spyware]
uAction_Program = 5 (Clean)
uSecAction_Program = 3 (Move) => = 4 (Delete)
[Trusted-Spyware] [Trusted-Spyware]
uAction_Program = 4 (Delete)
uSecAction_Program = 3 (Move) => = 7 (Deny)
[Untrusted-Action] [Untrusted-Action]
uAction = 3 (Move) => = 4 (Delete)
uSecAction => = 7 (Deny)
[Untrusted-Action] [Untrusted-Action]
uAction = 5 (Clean)
uSecAction = 3 (Move) => = 4 (Delete)
[Untrusted-Action] [Untrusted-Action]
uAction = 4 (Delete)
uSecAction = 3 (Move) => = 7 (Deny)
[Untrusted-Spyware] [Untrusted-Spyware]
uAction_Program = 3 (Move) => = 4 (Delete)
uSecAction_Program = 4 (Delete) => = 7 (Deny)
[Untrusted-Spyware] [Untrusted-Spyware]
uAction_Program = 5 (Clean)
uSecAction_Program = 3 (Move) => = 4 (Delete)
[Untrusted-Spyware] [Untrusted-Spyware]
uAction_Program = 4 (Delete)
uSecAction_Program = 3 (Move) => = 7 (Deny)
[Default-Action] [Default-Action]
uAction = 3 (Move) => = 4 (Delete)
uSecAction => = 7 (Deny)
[Default-Action] [Default-Action]
uAction = 5 (Clean)
uSecAction = 3 (Move) => = 4 (Delete)
[Default-Action] [Default-Action]
uAction = 4 (Delete)
uSecAction = 3 (Move) => = 7 (Deny)
[Default-Spyware] [Default-Spyware]
uAction_Program = 3 (Move) => = 4 (Delete)
uSecAction_Program = 4 (Delete) => = 7 (Deny)
[Default-Spyware] [Default-Spyware]
uAction_Program = 5 (Clean)
uSecAction_Program = 3 (Move) => = 4 (Delete)
[Default-Spyware] [Default-Spyware]
uAction_Program = 4 (Delete)
uSecAction_Program = 3 (Move) => = 7 (Deny)
[General] [QuarantinePolicy]
szMoveToFolder=\quarantine => szQuarantineDirectory=<SYSTEM_DRIVE>\quarantine
~OR~
szMoveToFolder=C:\quarantine => szQuarantineDirectory=C:\quarantine
[Alerting]
-bMoveFiles
[Reporting]
-bLogUserName
[UIPOptions]
UseUTF8=0
----------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------
[Server_Trusted-Action] [Server_Trusted-Action]
uAction = 1 => = 7 (Deny)
uAction = 6 => = 1 (Continue)
uSecAction = 1 => = 7 (Deny)
uSecAction = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Trusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Trusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Trusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Action'
and b.SettingName = 'uSecAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Trusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Action'
and b.SettingName = 'uSecAction'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Trusted-Action] [Wrkstn_Trusted-Action]
uAction = 1 => = 7 (Deny)
uAction = 6 => = 1 (Continue)
uSecAction = 1 => = 7 (Deny)
uSecAction = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Trusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Trusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Trusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Action'
and b.SettingName = 'uSecAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Trusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Action'
and b.SettingName = 'uSecAction'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Server_Untrusted-Action] [Server_Untrusted-Action]
uAction = 1 => = 7 (Deny)
uAction = 6 => = 1 (Continue)
uSecAction = 1 => = 7 (Deny)
uSecAction = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Untrusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Untrusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Untrusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Action'
and b.SettingName = 'uSecAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Untrusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Action'
and b.SettingName = 'uSecAction'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Untrusted-Action] [Wrkstn_Untrusted-Action]
uAction = 1 => = 7 (Deny)
uAction = 6 => = 1 (Continue)
uSecAction = 1 => = 7 (Deny)
uSecAction = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Untrusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Untrusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Untrusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Action'
and b.SettingName = 'uSecAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Untrusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Action'
and b.SettingName = 'uSecAction'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Server_Default-Action] [Server_Default-Action]
uAction = 1 => = 7 (Deny)
uAction = 6 => = 1 (Continue)
uSecAction = 1 => = 7 (Deny)
uSecAction = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Default-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Default-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Default-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Action'
and b.SettingName = 'uSecAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Default-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Action'
and b.SettingName = 'uSecAction'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Default-Action] [Wrkstn_Default-Action]
uAction = 1 => = 7 (Deny)
uAction = 6 => = 1 (Continue)
uSecAction = 1 => = 7 (Deny)
uSecAction = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Default-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Default-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Default-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Action'
and b.SettingName = 'uSecAction'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Default-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Action'
and b.SettingName = 'uSecAction'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Server_Trusted-Spyware] [Server_Trusted-Spyware]
uAction_Program = 1 => = 7 (Deny)
uAction_Program = 6 => = 1 (Continue)
uSecAction_Program = 1 => = 7 (Deny)
uSecAction_Program = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Trusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Trusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Trusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Trusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Trusted-Spyware] [Wrkstn_Trusted-Spyware]
uAction_Program = 1 => = 7 (Deny)
uAction_Program = 6 => = 1 (Continue)
uSecAction_Program = 1 => = 7 (Deny)
uSecAction_Program = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Trusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Trusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Trusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Trusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Server_Untrusted-Spyware] [Server_Untrusted-Spyware]
uAction_Program = 1 => = 7 (Deny)
uAction_Program = 6 => = 1 (Continue)
uSecAction_Program = 1 => = 7 (Deny)
uSecAction_Program = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Untrusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Untrusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Untrusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Untrusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Untrusted-Spyware] [Wrkstn_Untrusted-Spyware]
uAction_Program = 1 => = 7 (Deny)
uAction_Program = 6 => = 1 (Continue)
uSecAction_Program = 1 => = 7 (Deny)
uSecAction_Program = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Untrusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Untrusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Untrusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Untrusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Server_Default-Spyware] [Server_Default-Spyware]
uAction_Program = 1 => = 7 (Deny)
uAction_Program = 6 => = 1 (Continue)
uSecAction_Program = 1 => = 7 (Deny)
uSecAction_Program = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Default-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Default-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Default-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Server_Default-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Default-Spyware] [Wrkstn_Default-Spyware]
uAction_Program = 1 => = 7 (Deny)
uAction_Program = 6 => = 1 (Continue)
uSecAction_Program = 1 => = 7 (Deny)
uSecAction_Program = 6 => = 1 (Continue)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Default-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Default-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '6'
)
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Default-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '1'
)
update PolicySettings
set Value = '1'
where
SectionName = 'Wrkstn_Default-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Spyware'
and b.SettingName = 'uSecAction_Program'
and b.Value = '6'
)
/* ----------------------------------------------------------------------------
[Server_EmailAction] [Server_EmailAction]
dwPromptButton => |= 0x00000020 (Delete Mail)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = convert(int,Value) | 0x00000020
where
SectionName = 'Server_EmailAction'
and SettingName = 'dwPromptButton'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_EmailAction'
and b.SettingName = 'dwPromptButton'
)
/* ----------------------------------------------------------------------------
[Wrkstn_EmailAction] [Wrkstn_EmailAction]
dwPromptButton => |= 0x00000020 (Delete Mail)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = convert(int,Value) | 0x00000020
where
SectionName = 'Wrkstn_EmailAction'
and SettingName = 'dwPromptButton'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_EmailAction'
and b.SettingName = 'dwPromptButton'
)
/* ----------------------------------------------------------------------------
[Server_EntExclItems]
-EnterceptExclusionModule_
---------------------------------------------------------------------------- */
delete PolicySettings
where
PolicySettings.SectionName = 'Server_EntExclItems'
and PolicySettings.SettingName like 'EnterceptExclusionModule_%'
and PolicySettings.ParentID in
(select
AutoID
from Policy, PolicySettings
where
Policy.autoid = PolicySettings.parentid
and Policy.ProductCode = 'VIRUSCAN8700'
and Policy.ParentType in (6, 5, 4, 3, 1)
)
/* ----------------------------------------------------------------------------
[Server_EntExclItems]
-EnterceptExclusionAPI_
---------------------------------------------------------------------------- */
delete PolicySettings
where
PolicySettings.SectionName = 'Server_EntExclItems'
and PolicySettings.SettingName like 'EnterceptExclusionAPI_%'
and PolicySettings.ParentID in
(select
AutoID
from Policy, PolicySettings
where
Policy.autoid = PolicySettings.parentid
and Policy.ProductCode = 'VIRUSCAN8700'
and Policy.ParentType in (6, 5, 4, 3, 1)
)
/* ----------------------------------------------------------------------------
[Wrkstn_EntExclItems]
-EnterceptExclusionModule_
---------------------------------------------------------------------------- */
delete PolicySettings
where
PolicySettings.SectionName = 'Wrkstn_EntExclItems'
and PolicySettings.SettingName like 'EnterceptExclusionModule_%'
and PolicySettings.ParentID in
(select
AutoID
from Policy, PolicySettings
where
Policy.autoid = PolicySettings.parentid
and Policy.ProductCode = 'VIRUSCAN8700'
and Policy.ParentType in (6, 5, 4, 3, 1)
)
/* ----------------------------------------------------------------------------
[Wrkstn_EntExclItems]
-EnterceptExclusionAPI_
---------------------------------------------------------------------------- */
delete PolicySettings
where
PolicySettings.SectionName = 'Wrkstn_EntExclItems'
and PolicySettings.SettingName like 'EnterceptExclusionAPI_%'
and PolicySettings.ParentID in
(select
AutoID
from Policy, PolicySettings
where
Policy.autoid = PolicySettings.parentid
and Policy.ProductCode = 'VIRUSCAN8700'
and Policy.ParentType in (6, 5, 4, 3, 1)
)
/* ----------------------------------------------------------------------------
[Server_Trusted-Action] [Server_Trusted-Action]
uAction = 3 (Move) => = 4 (Delete)
uSecAction => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Trusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Trusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Trusted-Action] [Wrkstn_Trusted-Action]
uAction = 3 (Move) => = 4 (Delete)
uSecAction => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Trusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Trusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Trusted-Action] [Server_Trusted-Action]
uAction = 5 (Clean)
uSecAction = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Trusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Trusted-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Trusted-Action] [Wrkstn_Trusted-Action]
uAction = 5 (Clean)
uSecAction = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Trusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Trusted-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Trusted-Action] [Server_Trusted-Action]
uAction = 4 (Delete)
uSecAction = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Trusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Trusted-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Trusted-Action] [Wrkstn_Trusted-Action]
uAction = 4 (Delete)
uSecAction = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Trusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Action'
and b.SettingName = 'uAction'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Trusted-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Trusted-Spyware] [Server_Trusted-Spyware]
uAction_Program = 3 (Move) => = 4 (Delete)
uSecAction_Program = 4 (Delete) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Trusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Trusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '4'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Trusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Trusted-Spyware] [Wrkstn_Trusted-Spyware]
uAction_Program = 3 (Move) => = 4 (Delete)
uSecAction_Program = 4 (Delete) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Trusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Trusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '4'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Trusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Trusted-Spyware] [Server_Trusted-Spyware]
uAction_Program = 5 (Clean)
uSecAction_Program = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Trusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Trusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Trusted-Spyware] [Wrkstn_Trusted-Spyware]
uAction_Program = 5 (Clean)
uSecAction_Program = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Trusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Trusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Trusted-Spyware] [Server_Trusted-Spyware]
uAction_Program = 4 (Delete)
uSecAction_Program = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Trusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Trusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Trusted-Spyware] [Wrkstn_Trusted-Spyware]
uAction_Program = 4 (Delete)
uSecAction_Program = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Trusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Trusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Trusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Untrusted-Action] [Server_Untrusted-Action]
uAction = 3 (Move) => = 4 (Delete)
uSecAction => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Untrusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Untrusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Untrusted-Action] [Wrkstn_Untrusted-Action]
uAction = 3 (Move) => = 4 (Delete)
uSecAction => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Untrusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Untrusted-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Untrusted-Action] [Server_Untrusted-Action]
uAction = 5 (Clean)
uSecAction = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Untrusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Untrusted-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Untrusted-Action] [Wrkstn_Untrusted-Action]
uAction = 5 (Clean)
uSecAction = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Untrusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Untrusted-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Untrusted-Action] [Server_Untrusted-Action]
uAction = 4 (Delete)
uSecAction = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Untrusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Untrusted-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Untrusted-Action] [Wrkstn_Untrusted-Action]
uAction = 4 (Delete)
uSecAction = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Untrusted-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Action'
and b.SettingName = 'uAction'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Untrusted-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Untrusted-Spyware] [Server_Untrusted-Spyware]
uAction_Program = 3 (Move) => = 4 (Delete)
uSecAction_Program = 4 (Delete) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Untrusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Untrusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '4'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Untrusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Untrusted-Spyware] [Wrkstn_Untrusted-Spyware]
uAction_Program = 3 (Move) => = 4 (Delete)
uSecAction_Program = 4 (Delete) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Untrusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Untrusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '4'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Untrusted-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Untrusted-Spyware] [Server_Untrusted-Spyware]
uAction_Program = 5 (Clean)
uSecAction_Program = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Untrusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Untrusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Untrusted-Spyware] [Wrkstn_Untrusted-Spyware]
uAction_Program = 5 (Clean)
uSecAction_Program = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Untrusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Untrusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Untrusted-Spyware] [Server_Untrusted-Spyware]
uAction_Program = 4 (Delete)
uSecAction_Program = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Untrusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Untrusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Untrusted-Spyware] [Wrkstn_Untrusted-Spyware]
uAction_Program = 4 (Delete)
uSecAction_Program = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Untrusted-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Untrusted-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Untrusted-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Default-Action] [Server_Default-Action]
uAction = 3 (Move) => = 4 (Delete)
uSecAction => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Default-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Default-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Default-Action] [Wrkstn_Default-Action]
uAction = 3 (Move) => = 4 (Delete)
uSecAction => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Default-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Default-Action'
and SettingName = 'uAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Default-Action] [Server_Default-Action]
uAction = 5 (Clean)
uSecAction = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Default-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Default-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Default-Action] [Wrkstn_Default-Action]
uAction = 5 (Clean)
uSecAction = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Default-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Default-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Default-Action] [Server_Default-Action]
uAction = 4 (Delete)
uSecAction = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Default-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Default-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Default-Action] [Wrkstn_Default-Action]
uAction = 4 (Delete)
uSecAction = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Default-Action'
and SettingName = 'uSecAction'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Action'
and b.SettingName = 'uAction'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Default-Action'
and c.SettingName = 'uSecAction'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Default-Spyware] [Server_Default-Spyware]
uAction_Program = 3 (Move) => = 4 (Delete)
uSecAction_Program = 4 (Delete) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Default-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Default-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '4'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Default-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Default-Spyware] [Wrkstn_Default-Spyware]
uAction_Program = 3 (Move) => = 4 (Delete)
uSecAction_Program = 4 (Delete) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Default-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Default-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '4'
)
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Default-Spyware'
and SettingName = 'uAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Default-Spyware] [Server_Default-Spyware]
uAction_Program = 5 (Clean)
uSecAction_Program = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Server_Default-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Default-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Default-Spyware] [Wrkstn_Default-Spyware]
uAction_Program = 5 (Clean)
uSecAction_Program = 3 (Move) => = 4 (Delete)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '4'
where
SectionName = 'Wrkstn_Default-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '5'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Default-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_Default-Spyware] [Server_Default-Spyware]
uAction_Program = 4 (Delete)
uSecAction_Program = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Server_Default-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Server_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Server_Default-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Wrkstn_Default-Spyware] [Wrkstn_Default-Spyware]
uAction_Program = 4 (Delete)
uSecAction_Program = 3 (Move) => = 7 (Deny)
---------------------------------------------------------------------------- */
update PolicySettings
set Value = '7'
where
SectionName = 'Wrkstn_Default-Spyware'
and SettingName = 'uSecAction_Program'
and PolicySettings.parentid in
(select b.parentid
from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
where
b.ParentID = #VirusScanPolicyIDs.AutoID3
and b.SectionName = 'Wrkstn_Default-Spyware'
and b.SettingName = 'uAction_Program'
and b.Value = '4'
and b.ParentID = c.ParentID
and c.SectionName = 'Wrkstn_Default-Spyware'
and c.SettingName = 'uSecAction_Program'
and c.Value = '3'
)
/* ----------------------------------------------------------------------------
[Server_General] [Server_QuarantinePolicy]
szMoveToFolder=\quarantine => szQuarantineDirectory=<SYSTEM_DRIVE>\quarantine
~OR~
szMoveToFolder=C:\quarantine => szQuarantineDirectory=C:\quarantine
---------------------------------------------------------------------------- */
insert PolicySettings
(ParentID, SectionName, SettingName, Value)
select #VirusScanPolicyIDs.AutoID3, 'Server_QuarantinePolicy', 'szQuarantineDirectory', '<SYSTEM_DRIVE>' + b.Value
from PolicySettings b, #VirusScanPolicyIDs
where
b.ParentID = #VirusScanPolicyIDs.AutoID2
and b.SectionName = 'Server_General'
and b.SettingName = 'szMoveToFolder'
and b.Value like '\%'
insert PolicySettings
(ParentID, SectionName, SettingName, Value)
select #VirusScanPolicyIDs.AutoID3, 'Server_QuarantinePolicy', 'szQuarantineDirectory', b.Value
from PolicySettings b, #VirusScanPolicyIDs
where
b.ParentID = #VirusScanPolicyIDs.AutoID2
and b.SectionName = 'Server_General'
and b.SettingName = 'szMoveToFolder'
and b.Value not like '\%'
delete PolicySettings
where
PolicySettings.SectionName = 'Server_General'
and PolicySettings.SettingName = 'szMoveToFolder'
and PolicySettings.ParentID in
(select
AutoID
from Policy, PolicySettings
where
Policy.autoid = PolicySettings.parentid
and Policy.ProductCode = 'VIRUSCAN8700'
and Policy.ParentType in (6, 5, 4, 3, 1)
)
/* ----------------------------------------------------------------------------
[Wrkstn_General] [Wrkstn_QuarantinePolicy]
szMoveToFolder=\quarantine => szQuarantineDirectory=<SYSTEM_DRIVE>\quarantine
~OR~
szMoveToFolder=C:\quarantine => szQuarantineDirectory=C:\quarantine
---------------------------------------------------------------------------- */
insert PolicySettings
(ParentID, SectionName, SettingName, Value)
select #VirusScanPolicyIDs.AutoID3, 'Wrkstn_QuarantinePolicy', 'szQuarantineDirectory', '<SYSTEM_DRIVE>' + b.Value
from PolicySettings b, #VirusScanPolicyIDs
where
b.ParentID = #VirusScanPolicyIDs.AutoID2
and b.SectionName = 'Wrkstn_General'
and b.SettingName = 'szMoveToFolder'
and b.Value like '\%'
insert PolicySettings
(ParentID, SectionName, SettingName, Value)
select #VirusScanPolicyIDs.AutoID3, 'Wrkstn_QuarantinePolicy', 'szQuarantineDirectory', b.Value
from PolicySettings b, #VirusScanPolicyIDs
where
b.ParentID = #VirusScanPolicyIDs.AutoID2
and b.SectionName = 'Wrkstn_General'
and b.SettingName = 'szMoveToFolder'
and b.Value not like '\%'
delete PolicySettings
where
PolicySettings.SectionName = 'Wrkstn_General'
and PolicySettings.SettingName = 'szMoveToFolder'
and PolicySettings.ParentID in
(select
AutoID
from Policy, PolicySettings
where
Policy.autoid = PolicySettings.parentid
and Policy.ProductCode = 'VIRUSCAN8700'
and Policy.ParentType in (6, 5, 4, 3, 1)
)
/* ----------------------------------------------------------------------------
[Server_Alerting]
-bMoveFiles
---------------------------------------------------------------------------- */
delete PolicySettings
where
PolicySettings.SectionName = 'Server_Alerting'
and PolicySettings.SettingName = 'bMoveFiles'
and PolicySettings.ParentID in
(select
AutoID
from Policy, PolicySettings
where
Policy.autoid = PolicySettings.parentid
and Policy.ProductCode = 'VIRUSCAN8700'
and Policy.ParentType in (6, 5, 4, 3, 1)
)
/* ----------------------------------------------------------------------------
[Wrkstn_Alerting]
-bMoveFiles
---------------------------------------------------------------------------- */
delete PolicySettings
where
PolicySettings.SectionName = 'Wrkstn_Alerting'
and PolicySettings.SettingName = 'bMoveFiles'
and PolicySettings.ParentID in
(select
AutoID
from Policy, PolicySettings
where
Policy.autoid = PolicySettings.parentid
and Policy.ProductCode = 'VIRUSCAN8700'
and Policy.ParentType in (6, 5, 4, 3, 1)
)
/* ----------------------------------------------------------------------------
[Server_Reporting]
-bLogUserName
---------------------------------------------------------------------------- */
delete PolicySettings
where
PolicySettings.SectionName = 'Server_Reporting'
and PolicySettings.SettingName = 'bLogUserName'
and PolicySettings.ParentID in
(select
AutoID
from Policy, PolicySettings
where
Policy.autoid = PolicySettings.parentid
and Policy.ProductCode = 'VIRUSCAN8700'
and Policy.ParentType in (6, 5, 4, 3, 1)
)
/* ----------------------------------------------------------------------------
[Wrkstn_Reporting]
-bLogUserName
---------------------------------------------------------------------------- */
delete PolicySettings
where
PolicySettings.SectionName = 'Wrkstn_Reporting'
and PolicySettings.SettingName = 'bLogUserName'
and PolicySettings.ParentID in
(select
AutoID
from Policy, PolicySettings
where
Policy.autoid = PolicySettings.parentid
and Policy.ProductCode = 'VIRUSCAN8700'
and Policy.ParentType in (6, 5, 4, 3, 1)
)
/* ----------------------------------------------------------------------------
[Server_UIPOptions]
UseUTF8=0
---------------------------------------------------------------------------- */
insert PolicySettings
(ParentID, SectionName, SettingName, Value)
select #VirusScanPolicyIDs.AutoID3, 'Server_UIPOptions', 'UseUTF8', '0'
from PolicySettings b, #VirusScanPolicyIDs
where
b.ParentID = #VirusScanPolicyIDs.AutoID2
and b.SectionName = 'Server_UIPOptions'
/* ----------------------------------------------------------------------------
[Wrkstn_UIPOptions]
UseUTF8=0
---------------------------------------------------------------------------- */
insert PolicySettings
(ParentID, SectionName, SettingName, Value)
select #VirusScanPolicyIDs.AutoID3, 'Wrkstn_UIPOptions', 'UseUTF8', '0'
from PolicySettings b, #VirusScanPolicyIDs
where
b.ParentID = #VirusScanPolicyIDs.AutoID2
and b.SectionName = 'Wrkstn_UIPOptions'
end
go
/* ----------------------------------------------------------------------------
Done...
---------------------------------------------------------------------------- */
if exists (select * from tempdb..sysobjects where name like '#VirusScanPolicyIDs%')
drop table #VirusScanPolicyIDs
go