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 >
Text File  |  2007-10-05  |  74KB  |  2,308 lines

  1. -------------------------------------------------------------------------------
  2.  
  3. ------------  V S E  8 . 5  T O  8 . 7  P O L I C Y  U P G R A D E  -----------
  4.  
  5. -------------------------------------------------------------------------------
  6.  
  7. if exists (select * from tempdb..sysobjects where name like '#VirusScanPolicyIDs%')
  8. drop table #VirusScanPolicyIDs
  9. go
  10.  
  11. /* ----------------------------------------------------------------------------
  12. Copy over 8.5.0 policies to 8.7.0 policies only if non global 8.7.0 policies 
  13. don't exist.
  14. ---------------------------------------------------------------------------- */
  15. if not exists (select * from PolicySettings, Policy 
  16.     where PolicySettings.ParentID = Policy.AutoID 
  17.         and ProductCode = 'VIRUSCAN8700' and parentType != 7)
  18. begin
  19.  
  20. /* ----------------------------------------------------------------------------
  21. Copy all non global policy table 8.5.0 policies to 8.7.0 policies.
  22. ---------------------------------------------------------------------------- */
  23. insert Policy
  24. (ParentID, ParentType, ProductCode)
  25. select ParentID, ParentType, 'VIRUSCAN8700'
  26. from Policy
  27. where
  28. Policy.ProductCode = 'VIRUSCAN8600'
  29. and Policy.ParentType in (6, 5, 4, 3, 1)
  30.  
  31. /* ----------------------------------------------------------------------------
  32. Get policy.autoids of all 8.5.0 and 8.7.0 policies.
  33. ---------------------------------------------------------------------------- */
  34. select a.AutoID as AutoID2, b.AutoID as AutoID3
  35. into #VirusScanPolicyIDs
  36. from Policy a, Policy b
  37. where
  38. a.ProductCode = 'VIRUSCAN8600'
  39. and b.ProductCode = 'VIRUSCAN8700'
  40. and a.ParentType = b.ParentType
  41. and a.ParentID = b.ParentID
  42. and a.ParentType in (6, 5, 4, 3, 1)
  43.  
  44. /* ----------------------------------------------------------------------------
  45. Copy all non global PolicySetting from 8.5.0 policy settings to 8.7.0 policy
  46. settings.
  47. ---------------------------------------------------------------------------- */
  48. insert PolicySettings
  49. (ParentID, SectionName, SettingName, Value)
  50. select #VirusScanPolicyIDs.AutoID3, SectionName, SettingName, Value
  51. from PolicySettings, #VirusScanPolicyIDs
  52. where
  53. PolicySettings.ParentID = #VirusScanPolicyIDs.AutoID2
  54.  
  55. /* ----------------------------------------------------------------------------
  56.  Change the SectionName and/or the SettingName of the policies that have moved.
  57.  A "-" sign indicates that the value is no longer used and is to be deleted only.
  58.  
  59. OLD VALUE:                                                        NEW VALUE:
  60. [Trusted-Action]                                                [Trusted-Action]
  61. uAction                                        = 1                =>  = 7 (Deny)
  62. uAction                                        = 6                =>  = 1 (Continue)
  63. uSecAction                                    = 1                =>  = 7 (Deny)
  64. uSecAction                                    = 6                =>  = 1 (Continue)
  65.  
  66. [Untrusted-Action]                                                [Untrusted-Action]
  67. uAction                                        = 1                =>  = 7 (Deny)
  68. uAction                                        = 6                =>  = 1 (Continue)
  69. uSecAction                                    = 1                =>  = 7 (Deny)
  70. uSecAction                                    = 6                =>  = 1 (Continue)
  71.  
  72. [Default-Action]                                                [Default-Action]
  73. uAction                                        = 1                =>  = 7 (Deny)
  74. uAction                                        = 6                =>  = 1 (Continue)
  75. uSecAction                                    = 1                =>  = 7 (Deny)
  76. uSecAction                                    = 6                =>  = 1 (Continue)
  77.  
  78. [Trusted-Spyware]                                                [Trusted-Spyware]
  79. uAction_Program                                = 1                =>  = 7 (Deny)
  80. uAction_Program                                = 6                =>  = 1 (Continue)
  81. uSecAction_Program                            = 1                =>  = 7 (Deny)
  82. uSecAction_Program                            = 6                =>  = 1 (Continue)
  83.  
  84. [Untrusted-Spyware]                                                [Untrusted-Spyware]
  85. uAction_Program                                = 1                =>  = 7 (Deny)
  86. uAction_Program                                = 6                =>  = 1 (Continue)
  87. uSecAction_Program                            = 1                =>  = 7 (Deny)
  88. uSecAction_Program                            = 6                =>  = 1 (Continue)
  89.  
  90. [Default-Spyware]                                                [Default-Spyware]
  91. uAction_Program                                = 1                =>  = 7 (Deny)
  92. uAction_Program                                = 6                =>  = 1 (Continue)
  93. uSecAction_Program                            = 1                =>  = 7 (Deny)
  94. uSecAction_Program                            = 6                =>  = 1 (Continue)
  95.  
  96. [EmailAction]                                                    [EmailAction]        
  97. dwPromptButton                                                =>    |= 0x00000020 (Delete Mail)
  98.  
  99. [Server_EntExclItems]
  100. -EnterceptExclusionModule_
  101.  
  102. [Server_EntExclItems]
  103. -EnterceptExclusionAPI_
  104.  
  105. [Trusted-Action]                                                [Trusted-Action]
  106. uAction                                        = 3    (Move)        =>  = 4 (Delete)
  107. uSecAction                                                    =>  = 7 (Deny)
  108.  
  109. [Trusted-Action]                                                [Trusted-Action]
  110. uAction                                        = 5    (Clean)
  111. uSecAction                                    = 3    (Move)        =>  = 4 (Delete)
  112.  
  113. [Trusted-Action]                                                [Trusted-Action]
  114. uAction                                        = 4    (Delete)
  115. uSecAction                                    = 3    (Move)        =>  = 7 (Deny)
  116.  
  117. [Trusted-Spyware]                                                [Trusted-Spyware]
  118. uAction_Program                                = 3    (Move)        =>  = 4 (Delete)
  119. uSecAction_Program                            = 4    (Delete)    =>  = 7 (Deny)
  120.  
  121. [Trusted-Spyware]                                                [Trusted-Spyware]
  122. uAction_Program                                = 5 (Clean)
  123. uSecAction_Program                             = 3    (Move)        =>  = 4 (Delete)
  124.  
  125. [Trusted-Spyware]                                                [Trusted-Spyware]
  126. uAction_Program                                = 4 (Delete)
  127. uSecAction_Program                            = 3    (Move)        =>  = 7 (Deny)
  128.  
  129. [Untrusted-Action]                                                [Untrusted-Action]
  130. uAction                                        = 3    (Move)        =>  = 4 (Delete)
  131. uSecAction                                                    =>  = 7 (Deny)
  132.  
  133. [Untrusted-Action]                                                [Untrusted-Action]
  134. uAction                                        = 5    (Clean)
  135. uSecAction                                    = 3    (Move)        =>  = 4 (Delete)
  136.  
  137. [Untrusted-Action]                                                [Untrusted-Action]
  138. uAction                                        = 4    (Delete)
  139. uSecAction                                    = 3    (Move)        =>  = 7 (Deny)
  140.  
  141. [Untrusted-Spyware]                                                [Untrusted-Spyware]
  142. uAction_Program                                = 3    (Move)        =>  = 4 (Delete)
  143. uSecAction_Program                            = 4    (Delete)    =>  = 7 (Deny)
  144.  
  145. [Untrusted-Spyware]                                                [Untrusted-Spyware]
  146. uAction_Program                                = 5 (Clean)
  147. uSecAction_Program                            = 3    (Move)        =>  = 4 (Delete)
  148.  
  149. [Untrusted-Spyware]                                                [Untrusted-Spyware]
  150. uAction_Program                                = 4 (Delete)
  151. uSecAction_Program                            = 3    (Move)        =>  = 7 (Deny)
  152.  
  153. [Default-Action]                                                [Default-Action]
  154. uAction                                        = 3    (Move)        =>  = 4 (Delete)
  155. uSecAction                                                    =>  = 7 (Deny)
  156.  
  157. [Default-Action]                                                [Default-Action]
  158. uAction                                        = 5    (Clean)
  159. uSecAction                                    = 3    (Move)        =>  = 4 (Delete)
  160.  
  161. [Default-Action]                                                [Default-Action]
  162. uAction                                        = 4    (Delete)
  163. uSecAction                                    = 3    (Move)        =>  = 7 (Deny)
  164.  
  165. [Default-Spyware]                                                [Default-Spyware]
  166. uAction_Program                                = 3    (Move)        =>  = 4 (Delete)
  167. uSecAction_Program                            = 4    (Delete)    =>  = 7 (Deny)
  168.  
  169. [Default-Spyware]                                                [Default-Spyware]
  170. uAction_Program                                = 5 (Clean)
  171. uSecAction_Program                            = 3    (Move)        =>  = 4 (Delete)
  172.  
  173. [Default-Spyware]                                                [Default-Spyware]
  174. uAction_Program                                = 4 (Delete)
  175. uSecAction_Program                            = 3    (Move)        =>  = 7 (Deny)
  176.  
  177. [General]                                                        [QuarantinePolicy]
  178. szMoveToFolder=\quarantine                                    =>    szQuarantineDirectory=<SYSTEM_DRIVE>\quarantine
  179.  ~OR~
  180. szMoveToFolder=C:\quarantine                                =>    szQuarantineDirectory=C:\quarantine
  181.  
  182. [Alerting]                                                        
  183. -bMoveFiles
  184.  
  185. [Reporting]
  186. -bLogUserName
  187.  
  188. [UIPOptions]
  189. UseUTF8=0
  190. ----------------------------------------------------------------------------- */
  191.  
  192. /* ----------------------------------------------------------------------------
  193. [Server_Trusted-Action]                                    [Server_Trusted-Action]
  194. uAction                                = 1                =>  = 7 (Deny)
  195. uAction                                = 6                =>  = 1 (Continue)
  196. uSecAction                            = 1                =>  = 7 (Deny)
  197. uSecAction                            = 6                =>  = 1 (Continue)
  198. ---------------------------------------------------------------------------- */
  199. update PolicySettings
  200. set Value = '7'
  201. where
  202. SectionName = 'Server_Trusted-Action'
  203. and SettingName = 'uAction'
  204. and PolicySettings.parentid in 
  205.     (select b.parentid
  206.     from #VirusScanPolicyIDs, PolicySettings b
  207.     where
  208.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  209.     and b.SectionName = 'Server_Trusted-Action'
  210.     and b.SettingName = 'uAction'
  211.     and b.Value = '1'
  212.     )
  213.  
  214. update PolicySettings
  215. set Value = '1'
  216. where
  217. SectionName = 'Server_Trusted-Action'
  218. and SettingName = 'uAction'
  219. and PolicySettings.parentid in 
  220.     (select b.parentid
  221.     from #VirusScanPolicyIDs, PolicySettings b
  222.     where
  223.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  224.     and b.SectionName = 'Server_Trusted-Action'
  225.     and b.SettingName = 'uAction'
  226.     and b.Value = '6'
  227.     )
  228.  
  229. update PolicySettings
  230. set Value = '7'
  231. where
  232. SectionName = 'Server_Trusted-Action'
  233. and SettingName = 'uSecAction'
  234. and PolicySettings.parentid in 
  235.     (select b.parentid
  236.     from #VirusScanPolicyIDs, PolicySettings b
  237.     where
  238.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  239.     and b.SectionName = 'Server_Trusted-Action'
  240.     and b.SettingName = 'uSecAction'
  241.     and b.Value = '1'
  242.     )
  243.  
  244. update PolicySettings
  245. set Value = '1'
  246. where
  247. SectionName = 'Server_Trusted-Action'
  248. and SettingName = 'uSecAction'
  249. and PolicySettings.parentid in 
  250.     (select b.parentid
  251.     from #VirusScanPolicyIDs, PolicySettings b
  252.     where
  253.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  254.     and b.SectionName = 'Server_Trusted-Action'
  255.     and b.SettingName = 'uSecAction'
  256.     and b.Value = '6'
  257.     )
  258.     
  259. /* ----------------------------------------------------------------------------
  260. [Wrkstn_Trusted-Action]                                    [Wrkstn_Trusted-Action]
  261. uAction                                = 1                =>  = 7 (Deny)
  262. uAction                                = 6                =>  = 1 (Continue)
  263. uSecAction                            = 1                =>  = 7 (Deny)
  264. uSecAction                            = 6                =>  = 1 (Continue)
  265. ---------------------------------------------------------------------------- */
  266. update PolicySettings
  267. set Value = '7'
  268. where
  269. SectionName = 'Wrkstn_Trusted-Action'
  270. and SettingName = 'uAction'
  271. and PolicySettings.parentid in 
  272.     (select b.parentid
  273.     from #VirusScanPolicyIDs, PolicySettings b
  274.     where
  275.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  276.     and b.SectionName = 'Wrkstn_Trusted-Action'
  277.     and b.SettingName = 'uAction'
  278.     and b.Value = '1'
  279.     )
  280.  
  281. update PolicySettings
  282. set Value = '1'
  283. where
  284. SectionName = 'Wrkstn_Trusted-Action'
  285. and SettingName = 'uAction'
  286. and PolicySettings.parentid in 
  287.     (select b.parentid
  288.     from #VirusScanPolicyIDs, PolicySettings b
  289.     where
  290.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  291.     and b.SectionName = 'Wrkstn_Trusted-Action'
  292.     and b.SettingName = 'uAction'
  293.     and b.Value = '6'
  294.     )
  295.  
  296. update PolicySettings
  297. set Value = '7'
  298. where
  299. SectionName = 'Wrkstn_Trusted-Action'
  300. and SettingName = 'uSecAction'
  301. and PolicySettings.parentid in 
  302.     (select b.parentid
  303.     from #VirusScanPolicyIDs, PolicySettings b
  304.     where
  305.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  306.     and b.SectionName = 'Wrkstn_Trusted-Action'
  307.     and b.SettingName = 'uSecAction'
  308.     and b.Value = '1'
  309.     )
  310.  
  311. update PolicySettings
  312. set Value = '1'
  313. where
  314. SectionName = 'Wrkstn_Trusted-Action'
  315. and SettingName = 'uSecAction'
  316. and PolicySettings.parentid in 
  317.     (select b.parentid
  318.     from #VirusScanPolicyIDs, PolicySettings b
  319.     where
  320.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  321.     and b.SectionName = 'Wrkstn_Trusted-Action'
  322.     and b.SettingName = 'uSecAction'
  323.     and b.Value = '6'
  324.     )
  325.  
  326. /* ----------------------------------------------------------------------------
  327. [Server_Untrusted-Action]                                [Server_Untrusted-Action]
  328. uAction                                = 1                =>  = 7 (Deny)
  329. uAction                                = 6                =>  = 1 (Continue)
  330. uSecAction                            = 1                =>  = 7 (Deny)
  331. uSecAction                            = 6                =>  = 1 (Continue)
  332. ---------------------------------------------------------------------------- */
  333. update PolicySettings
  334. set Value = '7'
  335. where
  336. SectionName = 'Server_Untrusted-Action'
  337. and SettingName = 'uAction'
  338. and PolicySettings.parentid in 
  339.     (select b.parentid
  340.     from #VirusScanPolicyIDs, PolicySettings b
  341.     where
  342.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  343.     and b.SectionName = 'Server_Untrusted-Action'
  344.     and b.SettingName = 'uAction'
  345.     and b.Value = '1'
  346.     )
  347.  
  348. update PolicySettings
  349. set Value = '1'
  350. where
  351. SectionName = 'Server_Untrusted-Action'
  352. and SettingName = 'uAction'
  353. and PolicySettings.parentid in 
  354.     (select b.parentid
  355.     from #VirusScanPolicyIDs, PolicySettings b
  356.     where
  357.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  358.     and b.SectionName = 'Server_Untrusted-Action'
  359.     and b.SettingName = 'uAction'
  360.     and b.Value = '6'
  361.     )
  362.  
  363. update PolicySettings
  364. set Value = '7'
  365. where
  366. SectionName = 'Server_Untrusted-Action'
  367. and SettingName = 'uSecAction'
  368. and PolicySettings.parentid in 
  369.     (select b.parentid
  370.     from #VirusScanPolicyIDs, PolicySettings b
  371.     where
  372.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  373.     and b.SectionName = 'Server_Untrusted-Action'
  374.     and b.SettingName = 'uSecAction'
  375.     and b.Value = '1'
  376.     )
  377.  
  378. update PolicySettings
  379. set Value = '1'
  380. where
  381. SectionName = 'Server_Untrusted-Action'
  382. and SettingName = 'uSecAction'
  383. and PolicySettings.parentid in 
  384.     (select b.parentid
  385.     from #VirusScanPolicyIDs, PolicySettings b
  386.     where
  387.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  388.     and b.SectionName = 'Server_Untrusted-Action'
  389.     and b.SettingName = 'uSecAction'
  390.     and b.Value = '6'
  391.     )
  392.  
  393. /* ----------------------------------------------------------------------------
  394. [Wrkstn_Untrusted-Action]                                [Wrkstn_Untrusted-Action]
  395. uAction                                = 1                =>  = 7 (Deny)
  396. uAction                                = 6                =>  = 1 (Continue)
  397. uSecAction                            = 1                =>  = 7 (Deny)
  398. uSecAction                            = 6                =>  = 1 (Continue)
  399. ---------------------------------------------------------------------------- */
  400. update PolicySettings
  401. set Value = '7'
  402. where
  403. SectionName = 'Wrkstn_Untrusted-Action'
  404. and SettingName = 'uAction'
  405. and PolicySettings.parentid in 
  406.     (select b.parentid
  407.     from #VirusScanPolicyIDs, PolicySettings b
  408.     where
  409.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  410.     and b.SectionName = 'Wrkstn_Untrusted-Action'
  411.     and b.SettingName = 'uAction'
  412.     and b.Value = '1'
  413.     )
  414.  
  415. update PolicySettings
  416. set Value = '1'
  417. where
  418. SectionName = 'Wrkstn_Untrusted-Action'
  419. and SettingName = 'uAction'
  420. and PolicySettings.parentid in 
  421.     (select b.parentid
  422.     from #VirusScanPolicyIDs, PolicySettings b
  423.     where
  424.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  425.     and b.SectionName = 'Wrkstn_Untrusted-Action'
  426.     and b.SettingName = 'uAction'
  427.     and b.Value = '6'
  428.     )
  429.  
  430. update PolicySettings
  431. set Value = '7'
  432. where
  433. SectionName = 'Wrkstn_Untrusted-Action'
  434. and SettingName = 'uSecAction'
  435. and PolicySettings.parentid in 
  436.     (select b.parentid
  437.     from #VirusScanPolicyIDs, PolicySettings b
  438.     where
  439.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  440.     and b.SectionName = 'Wrkstn_Untrusted-Action'
  441.     and b.SettingName = 'uSecAction'
  442.     and b.Value = '1'
  443.     )
  444.  
  445. update PolicySettings
  446. set Value = '1'
  447. where
  448. SectionName = 'Wrkstn_Untrusted-Action'
  449. and SettingName = 'uSecAction'
  450. and PolicySettings.parentid in 
  451.     (select b.parentid
  452.     from #VirusScanPolicyIDs, PolicySettings b
  453.     where
  454.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  455.     and b.SectionName = 'Wrkstn_Untrusted-Action'
  456.     and b.SettingName = 'uSecAction'
  457.     and b.Value = '6'
  458.     )
  459.  
  460. /* ----------------------------------------------------------------------------
  461. [Server_Default-Action]                                    [Server_Default-Action]
  462. uAction                                = 1                =>  = 7 (Deny)
  463. uAction                                = 6                =>  = 1 (Continue)
  464. uSecAction                            = 1                =>  = 7 (Deny)
  465. uSecAction                            = 6                =>  = 1 (Continue)
  466. ---------------------------------------------------------------------------- */
  467. update PolicySettings
  468. set Value = '7'
  469. where
  470. SectionName = 'Server_Default-Action'
  471. and SettingName = 'uAction'
  472. and PolicySettings.parentid in 
  473.     (select b.parentid
  474.     from #VirusScanPolicyIDs, PolicySettings b
  475.     where
  476.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  477.     and b.SectionName = 'Server_Default-Action'
  478.     and b.SettingName = 'uAction'
  479.     and b.Value = '1'
  480.     )
  481.  
  482. update PolicySettings
  483. set Value = '1'
  484. where
  485. SectionName = 'Server_Default-Action'
  486. and SettingName = 'uAction'
  487. and PolicySettings.parentid in 
  488.     (select b.parentid
  489.     from #VirusScanPolicyIDs, PolicySettings b
  490.     where
  491.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  492.     and b.SectionName = 'Server_Default-Action'
  493.     and b.SettingName = 'uAction'
  494.     and b.Value = '6'
  495.     )
  496.  
  497. update PolicySettings
  498. set Value = '7'
  499. where
  500. SectionName = 'Server_Default-Action'
  501. and SettingName = 'uSecAction'
  502. and PolicySettings.parentid in 
  503.     (select b.parentid
  504.     from #VirusScanPolicyIDs, PolicySettings b
  505.     where
  506.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  507.     and b.SectionName = 'Server_Default-Action'
  508.     and b.SettingName = 'uSecAction'
  509.     and b.Value = '1'
  510.     )
  511.  
  512. update PolicySettings
  513. set Value = '1'
  514. where
  515. SectionName = 'Server_Default-Action'
  516. and SettingName = 'uSecAction'
  517. and PolicySettings.parentid in 
  518.     (select b.parentid
  519.     from #VirusScanPolicyIDs, PolicySettings b
  520.     where
  521.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  522.     and b.SectionName = 'Server_Default-Action'
  523.     and b.SettingName = 'uSecAction'
  524.     and b.Value = '6'
  525.     )
  526.     
  527. /* ----------------------------------------------------------------------------
  528. [Wrkstn_Default-Action]                                    [Wrkstn_Default-Action]
  529. uAction                                = 1                =>  = 7 (Deny)
  530. uAction                                = 6                =>  = 1 (Continue)
  531. uSecAction                            = 1                =>  = 7 (Deny)
  532. uSecAction                            = 6                =>  = 1 (Continue)
  533. ---------------------------------------------------------------------------- */
  534. update PolicySettings
  535. set Value = '7'
  536. where
  537. SectionName = 'Wrkstn_Default-Action'
  538. and SettingName = 'uAction'
  539. and PolicySettings.parentid in 
  540.     (select b.parentid
  541.     from #VirusScanPolicyIDs, PolicySettings b
  542.     where
  543.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  544.     and b.SectionName = 'Wrkstn_Default-Action'
  545.     and b.SettingName = 'uAction'
  546.     and b.Value = '1'
  547.     )
  548.  
  549. update PolicySettings
  550. set Value = '1'
  551. where
  552. SectionName = 'Wrkstn_Default-Action'
  553. and SettingName = 'uAction'
  554. and PolicySettings.parentid in 
  555.     (select b.parentid
  556.     from #VirusScanPolicyIDs, PolicySettings b
  557.     where
  558.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  559.     and b.SectionName = 'Wrkstn_Default-Action'
  560.     and b.SettingName = 'uAction'
  561.     and b.Value = '6'
  562.     )
  563.  
  564. update PolicySettings
  565. set Value = '7'
  566. where
  567. SectionName = 'Wrkstn_Default-Action'
  568. and SettingName = 'uSecAction'
  569. and PolicySettings.parentid in 
  570.     (select b.parentid
  571.     from #VirusScanPolicyIDs, PolicySettings b
  572.     where
  573.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  574.     and b.SectionName = 'Wrkstn_Default-Action'
  575.     and b.SettingName = 'uSecAction'
  576.     and b.Value = '1'
  577.     )
  578.  
  579. update PolicySettings
  580. set Value = '1'
  581. where
  582. SectionName = 'Wrkstn_Default-Action'
  583. and SettingName = 'uSecAction'
  584. and PolicySettings.parentid in 
  585.     (select b.parentid
  586.     from #VirusScanPolicyIDs, PolicySettings b
  587.     where
  588.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  589.     and b.SectionName = 'Wrkstn_Default-Action'
  590.     and b.SettingName = 'uSecAction'
  591.     and b.Value = '6'
  592.     )
  593.     
  594. /* ----------------------------------------------------------------------------
  595. [Server_Trusted-Spyware]                                [Server_Trusted-Spyware]
  596. uAction_Program                        = 1                =>  = 7 (Deny)
  597. uAction_Program                        = 6                =>  = 1 (Continue)
  598. uSecAction_Program                    = 1                =>  = 7 (Deny)
  599. uSecAction_Program                    = 6                =>  = 1 (Continue)
  600. ---------------------------------------------------------------------------- */
  601. update PolicySettings
  602. set Value = '7'
  603. where
  604. SectionName = 'Server_Trusted-Spyware'
  605. and SettingName = 'uAction_Program'
  606. and PolicySettings.parentid in 
  607.     (select b.parentid
  608.     from #VirusScanPolicyIDs, PolicySettings b
  609.     where
  610.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  611.     and b.SectionName = 'Server_Trusted-Spyware'
  612.     and b.SettingName = 'uAction_Program'
  613.     and b.Value = '1'
  614.     )
  615.  
  616. update PolicySettings
  617. set Value = '1'
  618. where
  619. SectionName = 'Server_Trusted-Spyware'
  620. and SettingName = 'uAction_Program'
  621. and PolicySettings.parentid in 
  622.     (select b.parentid
  623.     from #VirusScanPolicyIDs, PolicySettings b
  624.     where
  625.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  626.     and b.SectionName = 'Server_Trusted-Spyware'
  627.     and b.SettingName = 'uAction_Program'
  628.     and b.Value = '6'
  629.     )
  630.  
  631. update PolicySettings
  632. set Value = '7'
  633. where
  634. SectionName = 'Server_Trusted-Spyware'
  635. and SettingName = 'uSecAction_Program'
  636. and PolicySettings.parentid in 
  637.     (select b.parentid
  638.     from #VirusScanPolicyIDs, PolicySettings b
  639.     where
  640.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  641.     and b.SectionName = 'Server_Trusted-Spyware'
  642.     and b.SettingName = 'uSecAction_Program'
  643.     and b.Value = '1'
  644.     )
  645.  
  646. update PolicySettings
  647. set Value = '1'
  648. where
  649. SectionName = 'Server_Trusted-Spyware'
  650. and SettingName = 'uSecAction_Program'
  651. and PolicySettings.parentid in 
  652.     (select b.parentid
  653.     from #VirusScanPolicyIDs, PolicySettings b
  654.     where
  655.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  656.     and b.SectionName = 'Server_Trusted-Spyware'
  657.     and b.SettingName = 'uSecAction_Program'
  658.     and b.Value = '6'
  659.     )
  660.     
  661. /* ----------------------------------------------------------------------------
  662. [Wrkstn_Trusted-Spyware]                                [Wrkstn_Trusted-Spyware]
  663. uAction_Program                        = 1                =>  = 7 (Deny)
  664. uAction_Program                        = 6                =>  = 1 (Continue)
  665. uSecAction_Program                    = 1                =>  = 7 (Deny)
  666. uSecAction_Program                    = 6                =>  = 1 (Continue)
  667. ---------------------------------------------------------------------------- */
  668. update PolicySettings
  669. set Value = '7'
  670. where
  671. SectionName = 'Wrkstn_Trusted-Spyware'
  672. and SettingName = 'uAction_Program'
  673. and PolicySettings.parentid in 
  674.     (select b.parentid
  675.     from #VirusScanPolicyIDs, PolicySettings b
  676.     where
  677.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  678.     and b.SectionName = 'Wrkstn_Trusted-Spyware'
  679.     and b.SettingName = 'uAction_Program'
  680.     and b.Value = '1'
  681.     )
  682.  
  683. update PolicySettings
  684. set Value = '1'
  685. where
  686. SectionName = 'Wrkstn_Trusted-Spyware'
  687. and SettingName = 'uAction_Program'
  688. and PolicySettings.parentid in 
  689.     (select b.parentid
  690.     from #VirusScanPolicyIDs, PolicySettings b
  691.     where
  692.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  693.     and b.SectionName = 'Wrkstn_Trusted-Spyware'
  694.     and b.SettingName = 'uAction_Program'
  695.     and b.Value = '6'
  696.     )
  697.  
  698. update PolicySettings
  699. set Value = '7'
  700. where
  701. SectionName = 'Wrkstn_Trusted-Spyware'
  702. and SettingName = 'uSecAction_Program'
  703. and PolicySettings.parentid in 
  704.     (select b.parentid
  705.     from #VirusScanPolicyIDs, PolicySettings b
  706.     where
  707.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  708.     and b.SectionName = 'Wrkstn_Trusted-Spyware'
  709.     and b.SettingName = 'uSecAction_Program'
  710.     and b.Value = '1'
  711.     )
  712.  
  713. update PolicySettings
  714. set Value = '1'
  715. where
  716. SectionName = 'Wrkstn_Trusted-Spyware'
  717. and SettingName = 'uSecAction_Program'
  718. and PolicySettings.parentid in 
  719.     (select b.parentid
  720.     from #VirusScanPolicyIDs, PolicySettings b
  721.     where
  722.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  723.     and b.SectionName = 'Wrkstn_Trusted-Spyware'
  724.     and b.SettingName = 'uSecAction_Program'
  725.     and b.Value = '6'
  726.     )
  727.     
  728. /* ----------------------------------------------------------------------------
  729. [Server_Untrusted-Spyware]                                [Server_Untrusted-Spyware]
  730. uAction_Program                        = 1                =>  = 7 (Deny)
  731. uAction_Program                        = 6                =>  = 1 (Continue)
  732. uSecAction_Program                    = 1                =>  = 7 (Deny)
  733. uSecAction_Program                    = 6                =>  = 1 (Continue)
  734. ---------------------------------------------------------------------------- */
  735. update PolicySettings
  736. set Value = '7'
  737. where
  738. SectionName = 'Server_Untrusted-Spyware'
  739. and SettingName = 'uAction_Program'
  740. and PolicySettings.parentid in 
  741.     (select b.parentid
  742.     from #VirusScanPolicyIDs, PolicySettings b
  743.     where
  744.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  745.     and b.SectionName = 'Server_Untrusted-Spyware'
  746.     and b.SettingName = 'uAction_Program'
  747.     and b.Value = '1'
  748.     )
  749.  
  750. update PolicySettings
  751. set Value = '1'
  752. where
  753. SectionName = 'Server_Untrusted-Spyware'
  754. and SettingName = 'uAction_Program'
  755. and PolicySettings.parentid in 
  756.     (select b.parentid
  757.     from #VirusScanPolicyIDs, PolicySettings b
  758.     where
  759.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  760.     and b.SectionName = 'Server_Untrusted-Spyware'
  761.     and b.SettingName = 'uAction_Program'
  762.     and b.Value = '6'
  763.     )
  764.  
  765. update PolicySettings
  766. set Value = '7'
  767. where
  768. SectionName = 'Server_Untrusted-Spyware'
  769. and SettingName = 'uSecAction_Program'
  770. and PolicySettings.parentid in 
  771.     (select b.parentid
  772.     from #VirusScanPolicyIDs, PolicySettings b
  773.     where
  774.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  775.     and b.SectionName = 'Server_Untrusted-Spyware'
  776.     and b.SettingName = 'uSecAction_Program'
  777.     and b.Value = '1'
  778.     )
  779.  
  780. update PolicySettings
  781. set Value = '1'
  782. where
  783. SectionName = 'Server_Untrusted-Spyware'
  784. and SettingName = 'uSecAction_Program'
  785. and PolicySettings.parentid in 
  786.     (select b.parentid
  787.     from #VirusScanPolicyIDs, PolicySettings b
  788.     where
  789.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  790.     and b.SectionName = 'Server_Untrusted-Spyware'
  791.     and b.SettingName = 'uSecAction_Program'
  792.     and b.Value = '6'
  793.     )
  794.     
  795. /* ----------------------------------------------------------------------------
  796. [Wrkstn_Untrusted-Spyware]                                [Wrkstn_Untrusted-Spyware]
  797. uAction_Program                        = 1                =>  = 7 (Deny)
  798. uAction_Program                        = 6                =>  = 1 (Continue)
  799. uSecAction_Program                    = 1                =>  = 7 (Deny)
  800. uSecAction_Program                    = 6                =>  = 1 (Continue)
  801. ---------------------------------------------------------------------------- */
  802. update PolicySettings
  803. set Value = '7'
  804. where
  805. SectionName = 'Wrkstn_Untrusted-Spyware'
  806. and SettingName = 'uAction_Program'
  807. and PolicySettings.parentid in 
  808.     (select b.parentid
  809.     from #VirusScanPolicyIDs, PolicySettings b
  810.     where
  811.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  812.     and b.SectionName = 'Wrkstn_Untrusted-Spyware'
  813.     and b.SettingName = 'uAction_Program'
  814.     and b.Value = '1'
  815.     )
  816.  
  817. update PolicySettings
  818. set Value = '1'
  819. where
  820. SectionName = 'Wrkstn_Untrusted-Spyware'
  821. and SettingName = 'uAction_Program'
  822. and PolicySettings.parentid in 
  823.     (select b.parentid
  824.     from #VirusScanPolicyIDs, PolicySettings b
  825.     where
  826.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  827.     and b.SectionName = 'Wrkstn_Untrusted-Spyware'
  828.     and b.SettingName = 'uAction_Program'
  829.     and b.Value = '6'
  830.     )
  831.  
  832. update PolicySettings
  833. set Value = '7'
  834. where
  835. SectionName = 'Wrkstn_Untrusted-Spyware'
  836. and SettingName = 'uSecAction_Program'
  837. and PolicySettings.parentid in 
  838.     (select b.parentid
  839.     from #VirusScanPolicyIDs, PolicySettings b
  840.     where
  841.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  842.     and b.SectionName = 'Wrkstn_Untrusted-Spyware'
  843.     and b.SettingName = 'uSecAction_Program'
  844.     and b.Value = '1'
  845.     )
  846.  
  847. update PolicySettings
  848. set Value = '1'
  849. where
  850. SectionName = 'Wrkstn_Untrusted-Spyware'
  851. and SettingName = 'uSecAction_Program'
  852. and PolicySettings.parentid in 
  853.     (select b.parentid
  854.     from #VirusScanPolicyIDs, PolicySettings b
  855.     where
  856.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  857.     and b.SectionName = 'Wrkstn_Untrusted-Spyware'
  858.     and b.SettingName = 'uSecAction_Program'
  859.     and b.Value = '6'
  860.     )
  861.     
  862. /* ----------------------------------------------------------------------------
  863. [Server_Default-Spyware]                                [Server_Default-Spyware]
  864. uAction_Program                        = 1                =>  = 7 (Deny)
  865. uAction_Program                        = 6                =>  = 1 (Continue)
  866. uSecAction_Program                    = 1                =>  = 7 (Deny)
  867. uSecAction_Program                    = 6                =>  = 1 (Continue)
  868. ---------------------------------------------------------------------------- */
  869. update PolicySettings
  870. set Value = '7'
  871. where
  872. SectionName = 'Server_Default-Spyware'
  873. and SettingName = 'uAction_Program'
  874. and PolicySettings.parentid in 
  875.     (select b.parentid
  876.     from #VirusScanPolicyIDs, PolicySettings b
  877.     where
  878.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  879.     and b.SectionName = 'Server_Default-Spyware'
  880.     and b.SettingName = 'uAction_Program'
  881.     and b.Value = '1'
  882.     )
  883.  
  884. update PolicySettings
  885. set Value = '1'
  886. where
  887. SectionName = 'Server_Default-Spyware'
  888. and SettingName = 'uAction_Program'
  889. and PolicySettings.parentid in 
  890.     (select b.parentid
  891.     from #VirusScanPolicyIDs, PolicySettings b
  892.     where
  893.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  894.     and b.SectionName = 'Server_Default-Spyware'
  895.     and b.SettingName = 'uAction_Program'
  896.     and b.Value = '6'
  897.     )
  898.  
  899. update PolicySettings
  900. set Value = '7'
  901. where
  902. SectionName = 'Server_Default-Spyware'
  903. and SettingName = 'uSecAction_Program'
  904. and PolicySettings.parentid in 
  905.     (select b.parentid
  906.     from #VirusScanPolicyIDs, PolicySettings b
  907.     where
  908.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  909.     and b.SectionName = 'Server_Default-Spyware'
  910.     and b.SettingName = 'uSecAction_Program'
  911.     and b.Value = '1'
  912.     )
  913.  
  914. update PolicySettings
  915. set Value = '1'
  916. where
  917. SectionName = 'Server_Default-Spyware'
  918. and SettingName = 'uSecAction_Program'
  919. and PolicySettings.parentid in 
  920.     (select b.parentid
  921.     from #VirusScanPolicyIDs, PolicySettings b
  922.     where
  923.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  924.     and b.SectionName = 'Server_Default-Spyware'
  925.     and b.SettingName = 'uSecAction_Program'
  926.     and b.Value = '6'
  927.     )
  928.     
  929. /* ----------------------------------------------------------------------------
  930. [Wrkstn_Default-Spyware]                                [Wrkstn_Default-Spyware]
  931. uAction_Program                        = 1                =>  = 7 (Deny)
  932. uAction_Program                        = 6                =>  = 1 (Continue)
  933. uSecAction_Program                    = 1                =>  = 7 (Deny)
  934. uSecAction_Program                    = 6                =>  = 1 (Continue)
  935. ---------------------------------------------------------------------------- */
  936. update PolicySettings
  937. set Value = '7'
  938. where
  939. SectionName = 'Wrkstn_Default-Spyware'
  940. and SettingName = 'uAction_Program'
  941. and PolicySettings.parentid in 
  942.     (select b.parentid
  943.     from #VirusScanPolicyIDs, PolicySettings b
  944.     where
  945.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  946.     and b.SectionName = 'Wrkstn_Default-Spyware'
  947.     and b.SettingName = 'uAction_Program'
  948.     and b.Value = '1'
  949.     )
  950.  
  951. update PolicySettings
  952. set Value = '1'
  953. where
  954. SectionName = 'Wrkstn_Default-Spyware'
  955. and SettingName = 'uAction_Program'
  956. and PolicySettings.parentid in 
  957.     (select b.parentid
  958.     from #VirusScanPolicyIDs, PolicySettings b
  959.     where
  960.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  961.     and b.SectionName = 'Wrkstn_Default-Spyware'
  962.     and b.SettingName = 'uAction_Program'
  963.     and b.Value = '6'
  964.     )
  965.  
  966. update PolicySettings
  967. set Value = '7'
  968. where
  969. SectionName = 'Wrkstn_Default-Spyware'
  970. and SettingName = 'uSecAction_Program'
  971. and PolicySettings.parentid in 
  972.     (select b.parentid
  973.     from #VirusScanPolicyIDs, PolicySettings b
  974.     where
  975.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  976.     and b.SectionName = 'Wrkstn_Default-Spyware'
  977.     and b.SettingName = 'uSecAction_Program'
  978.     and b.Value = '1'
  979.     )
  980.  
  981. update PolicySettings
  982. set Value = '1'
  983. where
  984. SectionName = 'Wrkstn_Default-Spyware'
  985. and SettingName = 'uSecAction_Program'
  986. and PolicySettings.parentid in 
  987.     (select b.parentid
  988.     from #VirusScanPolicyIDs, PolicySettings b
  989.     where
  990.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  991.     and b.SectionName = 'Wrkstn_Default-Spyware'
  992.     and b.SettingName = 'uSecAction_Program'
  993.     and b.Value = '6'
  994.     )
  995.  
  996. /* ----------------------------------------------------------------------------
  997. [Server_EmailAction]                                    [Server_EmailAction]
  998. dwPromptButton                                        =>    |= 0x00000020 (Delete Mail)
  999. ---------------------------------------------------------------------------- */
  1000. update PolicySettings
  1001. set Value = convert(int,Value) | 0x00000020
  1002. where
  1003. SectionName = 'Server_EmailAction'
  1004. and SettingName = 'dwPromptButton'
  1005. and PolicySettings.parentid in 
  1006.     (select b.parentid
  1007.     from #VirusScanPolicyIDs, PolicySettings b
  1008.     where
  1009.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1010.     and b.SectionName = 'Server_EmailAction'
  1011.     and b.SettingName = 'dwPromptButton'
  1012.     )
  1013.  
  1014. /* ----------------------------------------------------------------------------
  1015. [Wrkstn_EmailAction]                                    [Wrkstn_EmailAction]
  1016. dwPromptButton                                        =>    |= 0x00000020 (Delete Mail)
  1017. ---------------------------------------------------------------------------- */
  1018. update PolicySettings
  1019. set Value = convert(int,Value) | 0x00000020
  1020. where
  1021. SectionName = 'Wrkstn_EmailAction'
  1022. and SettingName = 'dwPromptButton'
  1023. and PolicySettings.parentid in 
  1024.     (select b.parentid
  1025.     from #VirusScanPolicyIDs, PolicySettings b
  1026.     where
  1027.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1028.     and b.SectionName = 'Wrkstn_EmailAction'
  1029.     and b.SettingName = 'dwPromptButton'
  1030.     )
  1031.     
  1032. /* ----------------------------------------------------------------------------
  1033. [Server_EntExclItems]
  1034. -EnterceptExclusionModule_
  1035. ---------------------------------------------------------------------------- */
  1036. delete PolicySettings 
  1037. where 
  1038. PolicySettings.SectionName = 'Server_EntExclItems'
  1039. and PolicySettings.SettingName like 'EnterceptExclusionModule_%'
  1040. and PolicySettings.ParentID in 
  1041. (select 
  1042. AutoID 
  1043. from Policy, PolicySettings
  1044. where 
  1045. Policy.autoid = PolicySettings.parentid
  1046. and Policy.ProductCode = 'VIRUSCAN8700'
  1047. and Policy.ParentType in (6, 5, 4, 3, 1)
  1048. )
  1049.  
  1050. /* ----------------------------------------------------------------------------
  1051. [Server_EntExclItems]
  1052. -EnterceptExclusionAPI_
  1053. ---------------------------------------------------------------------------- */
  1054. delete PolicySettings 
  1055. where 
  1056. PolicySettings.SectionName = 'Server_EntExclItems'
  1057. and PolicySettings.SettingName like 'EnterceptExclusionAPI_%'
  1058. and PolicySettings.ParentID in 
  1059. (select 
  1060. AutoID 
  1061. from Policy, PolicySettings
  1062. where 
  1063. Policy.autoid = PolicySettings.parentid
  1064. and Policy.ProductCode = 'VIRUSCAN8700'
  1065. and Policy.ParentType in (6, 5, 4, 3, 1)
  1066. )
  1067.  
  1068. /* ----------------------------------------------------------------------------
  1069. [Wrkstn_EntExclItems]
  1070. -EnterceptExclusionModule_
  1071. ---------------------------------------------------------------------------- */
  1072. delete PolicySettings 
  1073. where 
  1074. PolicySettings.SectionName = 'Wrkstn_EntExclItems'
  1075. and PolicySettings.SettingName like 'EnterceptExclusionModule_%'
  1076. and PolicySettings.ParentID in 
  1077. (select 
  1078. AutoID 
  1079. from Policy, PolicySettings
  1080. where 
  1081. Policy.autoid = PolicySettings.parentid
  1082. and Policy.ProductCode = 'VIRUSCAN8700'
  1083. and Policy.ParentType in (6, 5, 4, 3, 1)
  1084. )
  1085.  
  1086. /* ----------------------------------------------------------------------------
  1087. [Wrkstn_EntExclItems]
  1088. -EnterceptExclusionAPI_
  1089. ---------------------------------------------------------------------------- */
  1090. delete PolicySettings 
  1091. where 
  1092. PolicySettings.SectionName = 'Wrkstn_EntExclItems'
  1093. and PolicySettings.SettingName like 'EnterceptExclusionAPI_%'
  1094. and PolicySettings.ParentID in 
  1095. (select 
  1096. AutoID 
  1097. from Policy, PolicySettings
  1098. where 
  1099. Policy.autoid = PolicySettings.parentid
  1100. and Policy.ProductCode = 'VIRUSCAN8700'
  1101. and Policy.ParentType in (6, 5, 4, 3, 1)
  1102. )
  1103.  
  1104. /* ----------------------------------------------------------------------------
  1105. [Server_Trusted-Action]                                            [Server_Trusted-Action]
  1106. uAction                                        = 3    (Move)        =>  = 4 (Delete)
  1107. uSecAction                                                    =>  = 7 (Deny)
  1108. ---------------------------------------------------------------------------- */
  1109. update PolicySettings
  1110. set Value = '7'
  1111. where
  1112. SectionName = 'Server_Trusted-Action'
  1113. and SettingName = 'uSecAction'
  1114. and PolicySettings.parentid in 
  1115.     (select b.parentid
  1116.     from #VirusScanPolicyIDs, PolicySettings b
  1117.     where
  1118.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1119.     and b.SectionName = 'Server_Trusted-Action'
  1120.     and b.SettingName = 'uAction'
  1121.     and b.Value = '3'
  1122.     )
  1123.  
  1124. update PolicySettings
  1125. set Value = '4'
  1126. where
  1127. SectionName = 'Server_Trusted-Action'
  1128. and SettingName = 'uAction'
  1129. and PolicySettings.parentid in 
  1130.     (select b.parentid
  1131.     from #VirusScanPolicyIDs, PolicySettings b
  1132.     where
  1133.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1134.     and b.SectionName = 'Server_Trusted-Action'
  1135.     and b.SettingName = 'uAction'
  1136.     and b.Value = '3'
  1137.     )
  1138.  
  1139. /* ----------------------------------------------------------------------------
  1140. [Wrkstn_Trusted-Action]                                            [Wrkstn_Trusted-Action]
  1141. uAction                                        = 3    (Move)        =>  = 4 (Delete)
  1142. uSecAction                                                    =>  = 7 (Deny)
  1143. ---------------------------------------------------------------------------- */
  1144. update PolicySettings
  1145. set Value = '7'
  1146. where
  1147. SectionName = 'Wrkstn_Trusted-Action'
  1148. and SettingName = 'uSecAction'
  1149. and PolicySettings.parentid in 
  1150.     (select b.parentid
  1151.     from #VirusScanPolicyIDs, PolicySettings b
  1152.     where
  1153.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1154.     and b.SectionName = 'Wrkstn_Trusted-Action'
  1155.     and b.SettingName = 'uAction'
  1156.     and b.Value = '3'
  1157.     )
  1158.  
  1159. update PolicySettings
  1160. set Value = '4'
  1161. where
  1162. SectionName = 'Wrkstn_Trusted-Action'
  1163. and SettingName = 'uAction'
  1164. and PolicySettings.parentid in 
  1165.     (select b.parentid
  1166.     from #VirusScanPolicyIDs, PolicySettings b
  1167.     where
  1168.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1169.     and b.SectionName = 'Wrkstn_Trusted-Action'
  1170.     and b.SettingName = 'uAction'
  1171.     and b.Value = '3'
  1172.     )
  1173.  
  1174. /* ----------------------------------------------------------------------------
  1175. [Server_Trusted-Action]                                            [Server_Trusted-Action]
  1176. uAction                                        = 5    (Clean)
  1177. uSecAction                                    = 3    (Move)        =>  = 4 (Delete)
  1178. ---------------------------------------------------------------------------- */
  1179. update PolicySettings
  1180. set Value = '4'
  1181. where
  1182. SectionName = 'Server_Trusted-Action'
  1183. and SettingName = 'uSecAction'
  1184. and PolicySettings.parentid in 
  1185.     (select b.parentid
  1186.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1187.     where
  1188.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1189.     and b.SectionName = 'Server_Trusted-Action'
  1190.     and b.SettingName = 'uAction'
  1191.     and b.Value = '5'
  1192.     and b.ParentID = c.ParentID
  1193.     and c.SectionName = 'Server_Trusted-Action'
  1194.     and c.SettingName = 'uSecAction'
  1195.     and c.Value = '3'
  1196.     )
  1197.  
  1198. /* ----------------------------------------------------------------------------
  1199. [Wrkstn_Trusted-Action]                                            [Wrkstn_Trusted-Action]
  1200. uAction                                        = 5    (Clean)
  1201. uSecAction                                    = 3    (Move)        =>  = 4 (Delete)
  1202. ---------------------------------------------------------------------------- */
  1203. update PolicySettings
  1204. set Value = '4'
  1205. where
  1206. SectionName = 'Wrkstn_Trusted-Action'
  1207. and SettingName = 'uSecAction'
  1208. and PolicySettings.parentid in 
  1209.     (select b.parentid
  1210.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1211.     where
  1212.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1213.     and b.SectionName = 'Wrkstn_Trusted-Action'
  1214.     and b.SettingName = 'uAction'
  1215.     and b.Value = '5'
  1216.     and b.ParentID = c.ParentID
  1217.     and c.SectionName = 'Wrkstn_Trusted-Action'
  1218.     and c.SettingName = 'uSecAction'
  1219.     and c.Value = '3'
  1220.     )
  1221.  
  1222. /* ----------------------------------------------------------------------------
  1223. [Server_Trusted-Action]                                            [Server_Trusted-Action]
  1224. uAction                                        = 4    (Delete)
  1225. uSecAction                                    = 3    (Move)        =>  = 7 (Deny)
  1226. ---------------------------------------------------------------------------- */
  1227. update PolicySettings
  1228. set Value = '7'
  1229. where
  1230. SectionName = 'Server_Trusted-Action'
  1231. and SettingName = 'uSecAction'
  1232. and PolicySettings.parentid in 
  1233.     (select b.parentid
  1234.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1235.     where
  1236.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1237.     and b.SectionName = 'Server_Trusted-Action'
  1238.     and b.SettingName = 'uAction'
  1239.     and b.Value = '4'
  1240.     and b.ParentID = c.ParentID
  1241.     and c.SectionName = 'Server_Trusted-Action'
  1242.     and c.SettingName = 'uSecAction'
  1243.     and c.Value = '3'
  1244.     )
  1245.  
  1246. /* ----------------------------------------------------------------------------
  1247. [Wrkstn_Trusted-Action]                                            [Wrkstn_Trusted-Action]
  1248. uAction                                        = 4    (Delete)
  1249. uSecAction                                    = 3    (Move)        =>  = 7 (Deny)
  1250. ---------------------------------------------------------------------------- */
  1251. update PolicySettings
  1252. set Value = '7'
  1253. where
  1254. SectionName = 'Wrkstn_Trusted-Action'
  1255. and SettingName = 'uSecAction'
  1256. and PolicySettings.parentid in 
  1257.     (select b.parentid
  1258.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1259.     where
  1260.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1261.     and b.SectionName = 'Wrkstn_Trusted-Action'
  1262.     and b.SettingName = 'uAction'
  1263.     and b.Value = '4'
  1264.     and b.ParentID = c.ParentID
  1265.     and c.SectionName = 'Wrkstn_Trusted-Action'
  1266.     and c.SettingName = 'uSecAction'
  1267.     and c.Value = '3'
  1268.     )
  1269.  
  1270. /* ----------------------------------------------------------------------------
  1271. [Server_Trusted-Spyware]                                        [Server_Trusted-Spyware]
  1272. uAction_Program                                = 3    (Move)        =>  = 4 (Delete)
  1273. uSecAction_Program                            = 4    (Delete)    =>  = 7 (Deny)
  1274. ---------------------------------------------------------------------------- */
  1275. update PolicySettings
  1276. set Value = '7'
  1277. where
  1278. SectionName = 'Server_Trusted-Spyware'
  1279. and SettingName = 'uSecAction_Program'
  1280. and PolicySettings.parentid in 
  1281.     (select b.parentid
  1282.     from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
  1283.     where
  1284.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1285.     and b.SectionName = 'Server_Trusted-Spyware'
  1286.     and b.SettingName = 'uAction_Program'
  1287.     and b.Value = '3'
  1288.     and b.ParentID = c.ParentID
  1289.     and c.SectionName = 'Server_Trusted-Spyware'
  1290.     and c.SettingName = 'uSecAction_Program'
  1291.     and c.Value = '4'
  1292.     )
  1293.  
  1294. update PolicySettings
  1295. set Value = '4'
  1296. where
  1297. SectionName = 'Server_Trusted-Spyware'
  1298. and SettingName = 'uAction_Program'
  1299. and PolicySettings.parentid in 
  1300.     (select b.parentid
  1301.     from #VirusScanPolicyIDs, PolicySettings b
  1302.     where
  1303.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1304.     and b.SectionName = 'Server_Trusted-Spyware'
  1305.     and b.SettingName = 'uAction_Program'
  1306.     and b.Value = '3'
  1307.     )
  1308.  
  1309. /* ----------------------------------------------------------------------------
  1310. [Wrkstn_Trusted-Spyware]                                        [Wrkstn_Trusted-Spyware]
  1311. uAction_Program                                = 3    (Move)        =>  = 4 (Delete)
  1312. uSecAction_Program                            = 4    (Delete)    =>  = 7 (Deny)
  1313. ---------------------------------------------------------------------------- */
  1314. update PolicySettings
  1315. set Value = '7'
  1316. where
  1317. SectionName = 'Wrkstn_Trusted-Spyware'
  1318. and SettingName = 'uSecAction_Program'
  1319. and PolicySettings.parentid in 
  1320.     (select b.parentid
  1321.     from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
  1322.     where
  1323.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1324.     and b.SectionName = 'Wrkstn_Trusted-Spyware'
  1325.     and b.SettingName = 'uAction_Program'
  1326.     and b.Value = '3'
  1327.     and b.ParentID = c.ParentID
  1328.     and c.SectionName = 'Wrkstn_Trusted-Spyware'
  1329.     and c.SettingName = 'uSecAction_Program'
  1330.     and c.Value = '4'
  1331.     )
  1332.  
  1333. update PolicySettings
  1334. set Value = '4'
  1335. where
  1336. SectionName = 'Wrkstn_Trusted-Spyware'
  1337. and SettingName = 'uAction_Program'
  1338. and PolicySettings.parentid in 
  1339.     (select b.parentid
  1340.     from #VirusScanPolicyIDs, PolicySettings b
  1341.     where
  1342.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1343.     and b.SectionName = 'Wrkstn_Trusted-Spyware'
  1344.     and b.SettingName = 'uAction_Program'
  1345.     and b.Value = '3'
  1346.     )
  1347.  
  1348. /* ----------------------------------------------------------------------------
  1349. [Server_Trusted-Spyware]                                        [Server_Trusted-Spyware]
  1350. uAction_Program                                = 5 (Clean)
  1351. uSecAction_Program                             = 3    (Move)        =>  = 4 (Delete)
  1352. ---------------------------------------------------------------------------- */
  1353. update PolicySettings
  1354. set Value = '4'
  1355. where
  1356. SectionName = 'Server_Trusted-Spyware'
  1357. and SettingName = 'uSecAction_Program'
  1358. and PolicySettings.parentid in 
  1359.     (select b.parentid
  1360.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1361.     where
  1362.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1363.     and b.SectionName = 'Server_Trusted-Spyware'
  1364.     and b.SettingName = 'uAction_Program'
  1365.     and b.Value = '5'
  1366.     and b.ParentID = c.ParentID
  1367.     and c.SectionName = 'Server_Trusted-Spyware'
  1368.     and c.SettingName = 'uSecAction_Program'
  1369.     and c.Value = '3'
  1370.     )
  1371.  
  1372. /* ----------------------------------------------------------------------------
  1373. [Wrkstn_Trusted-Spyware]                                        [Wrkstn_Trusted-Spyware]
  1374. uAction_Program                                = 5 (Clean)
  1375. uSecAction_Program                             = 3    (Move)        =>  = 4 (Delete)
  1376. ---------------------------------------------------------------------------- */
  1377. update PolicySettings
  1378. set Value = '4'
  1379. where
  1380. SectionName = 'Wrkstn_Trusted-Spyware'
  1381. and SettingName = 'uSecAction_Program'
  1382. and PolicySettings.parentid in 
  1383.     (select b.parentid
  1384.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1385.     where
  1386.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1387.     and b.SectionName = 'Wrkstn_Trusted-Spyware'
  1388.     and b.SettingName = 'uAction_Program'
  1389.     and b.Value = '5'
  1390.     and b.ParentID = c.ParentID
  1391.     and c.SectionName = 'Wrkstn_Trusted-Spyware'
  1392.     and c.SettingName = 'uSecAction_Program'
  1393.     and c.Value = '3'
  1394.     )
  1395.  
  1396. /* ----------------------------------------------------------------------------
  1397. [Server_Trusted-Spyware]                                        [Server_Trusted-Spyware]
  1398. uAction_Program                                = 4 (Delete)
  1399. uSecAction_Program                            = 3    (Move)        =>  = 7 (Deny)
  1400. ---------------------------------------------------------------------------- */
  1401. update PolicySettings
  1402. set Value = '7'
  1403. where
  1404. SectionName = 'Server_Trusted-Spyware'
  1405. and SettingName = 'uSecAction_Program'
  1406. and PolicySettings.parentid in 
  1407.     (select b.parentid
  1408.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1409.     where
  1410.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1411.     and b.SectionName = 'Server_Trusted-Spyware'
  1412.     and b.SettingName = 'uAction_Program'
  1413.     and b.Value = '4'
  1414.     and b.ParentID = c.ParentID
  1415.     and c.SectionName = 'Server_Trusted-Spyware'
  1416.     and c.SettingName = 'uSecAction_Program'
  1417.     and c.Value = '3'
  1418.     )
  1419.  
  1420. /* ----------------------------------------------------------------------------
  1421. [Wrkstn_Trusted-Spyware]                                        [Wrkstn_Trusted-Spyware]
  1422. uAction_Program                                = 4 (Delete)
  1423. uSecAction_Program                            = 3    (Move)        =>  = 7 (Deny)
  1424. ---------------------------------------------------------------------------- */
  1425. update PolicySettings
  1426. set Value = '7'
  1427. where
  1428. SectionName = 'Wrkstn_Trusted-Spyware'
  1429. and SettingName = 'uSecAction_Program'
  1430. and PolicySettings.parentid in 
  1431.     (select b.parentid
  1432.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1433.     where
  1434.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1435.     and b.SectionName = 'Wrkstn_Trusted-Spyware'
  1436.     and b.SettingName = 'uAction_Program'
  1437.     and b.Value = '4'
  1438.     and b.ParentID = c.ParentID
  1439.     and c.SectionName = 'Wrkstn_Trusted-Spyware'
  1440.     and c.SettingName = 'uSecAction_Program'
  1441.     and c.Value = '3'
  1442.     )
  1443.  
  1444. /* ----------------------------------------------------------------------------
  1445. [Server_Untrusted-Action]                                        [Server_Untrusted-Action]
  1446. uAction                                        = 3    (Move)        =>  = 4 (Delete)
  1447. uSecAction                                                    =>  = 7 (Deny)
  1448. ---------------------------------------------------------------------------- */
  1449. update PolicySettings
  1450. set Value = '7'
  1451. where
  1452. SectionName = 'Server_Untrusted-Action'
  1453. and SettingName = 'uSecAction'
  1454. and PolicySettings.parentid in 
  1455.     (select b.parentid
  1456.     from #VirusScanPolicyIDs, PolicySettings b
  1457.     where
  1458.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1459.     and b.SectionName = 'Server_Untrusted-Action'
  1460.     and b.SettingName = 'uAction'
  1461.     and b.Value = '3'
  1462.     )
  1463.  
  1464. update PolicySettings
  1465. set Value = '4'
  1466. where
  1467. SectionName = 'Server_Untrusted-Action'
  1468. and SettingName = 'uAction'
  1469. and PolicySettings.parentid in 
  1470.     (select b.parentid
  1471.     from #VirusScanPolicyIDs, PolicySettings b
  1472.     where
  1473.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1474.     and b.SectionName = 'Server_Untrusted-Action'
  1475.     and b.SettingName = 'uAction'
  1476.     and b.Value = '3'
  1477.     )
  1478.  
  1479. /* ----------------------------------------------------------------------------
  1480. [Wrkstn_Untrusted-Action]                                        [Wrkstn_Untrusted-Action]
  1481. uAction                                        = 3    (Move)        =>  = 4 (Delete)
  1482. uSecAction                                                    =>  = 7 (Deny)
  1483. ---------------------------------------------------------------------------- */
  1484. update PolicySettings
  1485. set Value = '7'
  1486. where
  1487. SectionName = 'Wrkstn_Untrusted-Action'
  1488. and SettingName = 'uSecAction'
  1489. and PolicySettings.parentid in 
  1490.     (select b.parentid
  1491.     from #VirusScanPolicyIDs, PolicySettings b
  1492.     where
  1493.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1494.     and b.SectionName = 'Wrkstn_Untrusted-Action'
  1495.     and b.SettingName = 'uAction'
  1496.     and b.Value = '3'
  1497.     )
  1498.  
  1499. update PolicySettings
  1500. set Value = '4'
  1501. where
  1502. SectionName = 'Wrkstn_Untrusted-Action'
  1503. and SettingName = 'uAction'
  1504. and PolicySettings.parentid in 
  1505.     (select b.parentid
  1506.     from #VirusScanPolicyIDs, PolicySettings b
  1507.     where
  1508.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1509.     and b.SectionName = 'Wrkstn_Untrusted-Action'
  1510.     and b.SettingName = 'uAction'
  1511.     and b.Value = '3'
  1512.     )
  1513.  
  1514. /* ----------------------------------------------------------------------------
  1515. [Server_Untrusted-Action]                                        [Server_Untrusted-Action]
  1516. uAction                                        = 5    (Clean)
  1517. uSecAction                                    = 3    (Move)        =>  = 4 (Delete)
  1518. ---------------------------------------------------------------------------- */
  1519. update PolicySettings
  1520. set Value = '4'
  1521. where
  1522. SectionName = 'Server_Untrusted-Action'
  1523. and SettingName = 'uSecAction'
  1524. and PolicySettings.parentid in 
  1525.     (select b.parentid
  1526.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1527.     where
  1528.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1529.     and b.SectionName = 'Server_Untrusted-Action'
  1530.     and b.SettingName = 'uAction'
  1531.     and b.Value = '5'
  1532.     and b.ParentID = c.ParentID
  1533.     and c.SectionName = 'Server_Untrusted-Action'
  1534.     and c.SettingName = 'uSecAction'
  1535.     and c.Value = '3'
  1536.     )
  1537.  
  1538. /* ----------------------------------------------------------------------------
  1539. [Wrkstn_Untrusted-Action]                                        [Wrkstn_Untrusted-Action]
  1540. uAction                                        = 5    (Clean)
  1541. uSecAction                                    = 3    (Move)        =>  = 4 (Delete)
  1542. ---------------------------------------------------------------------------- */
  1543. update PolicySettings
  1544. set Value = '4'
  1545. where
  1546. SectionName = 'Wrkstn_Untrusted-Action'
  1547. and SettingName = 'uSecAction'
  1548. and PolicySettings.parentid in 
  1549.     (select b.parentid
  1550.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1551.     where
  1552.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1553.     and b.SectionName = 'Wrkstn_Untrusted-Action'
  1554.     and b.SettingName = 'uAction'
  1555.     and b.Value = '5'
  1556.     and b.ParentID = c.ParentID
  1557.     and c.SectionName = 'Wrkstn_Untrusted-Action'
  1558.     and c.SettingName = 'uSecAction'
  1559.     and c.Value = '3'
  1560.     )
  1561.  
  1562. /* ----------------------------------------------------------------------------
  1563. [Server_Untrusted-Action]                                        [Server_Untrusted-Action]
  1564. uAction                                        = 4    (Delete)
  1565. uSecAction                                    = 3    (Move)        =>  = 7 (Deny)
  1566. ---------------------------------------------------------------------------- */
  1567. update PolicySettings
  1568. set Value = '7'
  1569. where
  1570. SectionName = 'Server_Untrusted-Action'
  1571. and SettingName = 'uSecAction'
  1572. and PolicySettings.parentid in 
  1573.     (select b.parentid
  1574.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1575.     where
  1576.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1577.     and b.SectionName = 'Server_Untrusted-Action'
  1578.     and b.SettingName = 'uAction'
  1579.     and b.Value = '4'
  1580.     and b.ParentID = c.ParentID
  1581.     and c.SectionName = 'Server_Untrusted-Action'
  1582.     and c.SettingName = 'uSecAction'
  1583.     and c.Value = '3'
  1584.     )
  1585.  
  1586. /* ----------------------------------------------------------------------------
  1587. [Wrkstn_Untrusted-Action]                                        [Wrkstn_Untrusted-Action]
  1588. uAction                                        = 4    (Delete)
  1589. uSecAction                                    = 3    (Move)        =>  = 7 (Deny)
  1590. ---------------------------------------------------------------------------- */
  1591. update PolicySettings
  1592. set Value = '7'
  1593. where
  1594. SectionName = 'Wrkstn_Untrusted-Action'
  1595. and SettingName = 'uSecAction'
  1596. and PolicySettings.parentid in 
  1597.     (select b.parentid
  1598.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1599.     where
  1600.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1601.     and b.SectionName = 'Wrkstn_Untrusted-Action'
  1602.     and b.SettingName = 'uAction'
  1603.     and b.Value = '4'
  1604.     and b.ParentID = c.ParentID
  1605.     and c.SectionName = 'Wrkstn_Untrusted-Action'
  1606.     and c.SettingName = 'uSecAction'
  1607.     and c.Value = '3'
  1608.     )
  1609.  
  1610. /* ----------------------------------------------------------------------------
  1611. [Server_Untrusted-Spyware]                                        [Server_Untrusted-Spyware]
  1612. uAction_Program                                = 3    (Move)        =>  = 4 (Delete)
  1613. uSecAction_Program                            = 4    (Delete)    =>  = 7 (Deny)
  1614. ---------------------------------------------------------------------------- */
  1615. update PolicySettings
  1616. set Value = '7'
  1617. where
  1618. SectionName = 'Server_Untrusted-Spyware'
  1619. and SettingName = 'uSecAction_Program'
  1620. and PolicySettings.parentid in 
  1621.     (select b.parentid
  1622.     from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
  1623.     where
  1624.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1625.     and b.SectionName = 'Server_Untrusted-Spyware'
  1626.     and b.SettingName = 'uAction_Program'
  1627.     and b.Value = '3'
  1628.     and b.ParentID = c.ParentID
  1629.     and c.SectionName = 'Server_Untrusted-Spyware'
  1630.     and c.SettingName = 'uSecAction_Program'
  1631.     and c.Value = '4'
  1632.     )
  1633.  
  1634. update PolicySettings
  1635. set Value = '4'
  1636. where
  1637. SectionName = 'Server_Untrusted-Spyware'
  1638. and SettingName = 'uAction_Program'
  1639. and PolicySettings.parentid in 
  1640.     (select b.parentid
  1641.     from #VirusScanPolicyIDs, PolicySettings b
  1642.     where
  1643.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1644.     and b.SectionName = 'Server_Untrusted-Spyware'
  1645.     and b.SettingName = 'uAction_Program'
  1646.     and b.Value = '3'
  1647.     )
  1648.  
  1649. /* ----------------------------------------------------------------------------
  1650. [Wrkstn_Untrusted-Spyware]                                        [Wrkstn_Untrusted-Spyware]
  1651. uAction_Program                                = 3    (Move)        =>  = 4 (Delete)
  1652. uSecAction_Program                            = 4    (Delete)    =>  = 7 (Deny)
  1653. ---------------------------------------------------------------------------- */
  1654. update PolicySettings
  1655. set Value = '7'
  1656. where
  1657. SectionName = 'Wrkstn_Untrusted-Spyware'
  1658. and SettingName = 'uSecAction_Program'
  1659. and PolicySettings.parentid in 
  1660.     (select b.parentid
  1661.     from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
  1662.     where
  1663.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1664.     and b.SectionName = 'Wrkstn_Untrusted-Spyware'
  1665.     and b.SettingName = 'uAction_Program'
  1666.     and b.Value = '3'
  1667.     and b.ParentID = c.ParentID
  1668.     and c.SectionName = 'Wrkstn_Untrusted-Spyware'
  1669.     and c.SettingName = 'uSecAction_Program'
  1670.     and c.Value = '4'
  1671.     )
  1672.  
  1673. update PolicySettings
  1674. set Value = '4'
  1675. where
  1676. SectionName = 'Wrkstn_Untrusted-Spyware'
  1677. and SettingName = 'uAction_Program'
  1678. and PolicySettings.parentid in 
  1679.     (select b.parentid
  1680.     from #VirusScanPolicyIDs, PolicySettings b
  1681.     where
  1682.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1683.     and b.SectionName = 'Wrkstn_Untrusted-Spyware'
  1684.     and b.SettingName = 'uAction_Program'
  1685.     and b.Value = '3'
  1686.     )
  1687.  
  1688. /* ----------------------------------------------------------------------------
  1689. [Server_Untrusted-Spyware]                                        [Server_Untrusted-Spyware]
  1690. uAction_Program                                = 5 (Clean)
  1691. uSecAction_Program                            = 3    (Move)        =>  = 4 (Delete)
  1692. ---------------------------------------------------------------------------- */
  1693. update PolicySettings
  1694. set Value = '4'
  1695. where
  1696. SectionName = 'Server_Untrusted-Spyware'
  1697. and SettingName = 'uSecAction_Program'
  1698. and PolicySettings.parentid in 
  1699.     (select b.parentid
  1700.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1701.     where
  1702.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1703.     and b.SectionName = 'Server_Untrusted-Spyware'
  1704.     and b.SettingName = 'uAction_Program'
  1705.     and b.Value = '5'
  1706.     and b.ParentID = c.ParentID
  1707.     and c.SectionName = 'Server_Untrusted-Spyware'
  1708.     and c.SettingName = 'uSecAction_Program'
  1709.     and c.Value = '3'
  1710.     )
  1711.  
  1712. /* ----------------------------------------------------------------------------
  1713. [Wrkstn_Untrusted-Spyware]                                        [Wrkstn_Untrusted-Spyware]
  1714. uAction_Program                                = 5 (Clean)
  1715. uSecAction_Program                            = 3    (Move)        =>  = 4 (Delete)
  1716. ---------------------------------------------------------------------------- */
  1717. update PolicySettings
  1718. set Value = '4'
  1719. where
  1720. SectionName = 'Wrkstn_Untrusted-Spyware'
  1721. and SettingName = 'uSecAction_Program'
  1722. and PolicySettings.parentid in 
  1723.     (select b.parentid
  1724.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1725.     where
  1726.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1727.     and b.SectionName = 'Wrkstn_Untrusted-Spyware'
  1728.     and b.SettingName = 'uAction_Program'
  1729.     and b.Value = '5'
  1730.     and b.ParentID = c.ParentID
  1731.     and c.SectionName = 'Wrkstn_Untrusted-Spyware'
  1732.     and c.SettingName = 'uSecAction_Program'
  1733.     and c.Value = '3'
  1734.     )
  1735.  
  1736. /* ----------------------------------------------------------------------------
  1737. [Server_Untrusted-Spyware]                                        [Server_Untrusted-Spyware]
  1738. uAction_Program                                = 4 (Delete)
  1739. uSecAction_Program                            = 3    (Move)        =>  = 7 (Deny)
  1740. ---------------------------------------------------------------------------- */
  1741. update PolicySettings
  1742. set Value = '7'
  1743. where
  1744. SectionName = 'Server_Untrusted-Spyware'
  1745. and SettingName = 'uSecAction_Program'
  1746. and PolicySettings.parentid in 
  1747.     (select b.parentid
  1748.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1749.     where
  1750.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1751.     and b.SectionName = 'Server_Untrusted-Spyware'
  1752.     and b.SettingName = 'uAction_Program'
  1753.     and b.Value = '4'
  1754.     and b.ParentID = c.ParentID
  1755.     and c.SectionName = 'Server_Untrusted-Spyware'
  1756.     and c.SettingName = 'uSecAction_Program'
  1757.     and c.Value = '3'
  1758.     )
  1759.  
  1760. /* ----------------------------------------------------------------------------
  1761. [Wrkstn_Untrusted-Spyware]                                        [Wrkstn_Untrusted-Spyware]
  1762. uAction_Program                                = 4 (Delete)
  1763. uSecAction_Program                            = 3    (Move)        =>  = 7 (Deny)
  1764. ---------------------------------------------------------------------------- */
  1765. update PolicySettings
  1766. set Value = '7'
  1767. where
  1768. SectionName = 'Wrkstn_Untrusted-Spyware'
  1769. and SettingName = 'uSecAction_Program'
  1770. and PolicySettings.parentid in 
  1771.     (select b.parentid
  1772.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1773.     where
  1774.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1775.     and b.SectionName = 'Wrkstn_Untrusted-Spyware'
  1776.     and b.SettingName = 'uAction_Program'
  1777.     and b.Value = '4'
  1778.     and b.ParentID = c.ParentID
  1779.     and c.SectionName = 'Wrkstn_Untrusted-Spyware'
  1780.     and c.SettingName = 'uSecAction_Program'
  1781.     and c.Value = '3'
  1782.     )
  1783.  
  1784. /* ----------------------------------------------------------------------------
  1785. [Server_Default-Action]                                            [Server_Default-Action]
  1786. uAction                                        = 3    (Move)        =>  = 4 (Delete)
  1787. uSecAction                                                    =>  = 7 (Deny)
  1788. ---------------------------------------------------------------------------- */
  1789. update PolicySettings
  1790. set Value = '7'
  1791. where
  1792. SectionName = 'Server_Default-Action'
  1793. and SettingName = 'uSecAction'
  1794. and PolicySettings.parentid in 
  1795.     (select b.parentid
  1796.     from #VirusScanPolicyIDs, PolicySettings b
  1797.     where
  1798.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1799.     and b.SectionName = 'Server_Default-Action'
  1800.     and b.SettingName = 'uAction'
  1801.     and b.Value = '3'
  1802.     )
  1803.  
  1804. update PolicySettings
  1805. set Value = '4'
  1806. where
  1807. SectionName = 'Server_Default-Action'
  1808. and SettingName = 'uAction'
  1809. and PolicySettings.parentid in 
  1810.     (select b.parentid
  1811.     from #VirusScanPolicyIDs, PolicySettings b
  1812.     where
  1813.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1814.     and b.SectionName = 'Server_Default-Action'
  1815.     and b.SettingName = 'uAction'
  1816.     and b.Value = '3'
  1817.     )
  1818.  
  1819. /* ----------------------------------------------------------------------------
  1820. [Wrkstn_Default-Action]                                            [Wrkstn_Default-Action]
  1821. uAction                                        = 3    (Move)        =>  = 4 (Delete)
  1822. uSecAction                                                    =>  = 7 (Deny)
  1823. ---------------------------------------------------------------------------- */
  1824. update PolicySettings
  1825. set Value = '7'
  1826. where
  1827. SectionName = 'Wrkstn_Default-Action'
  1828. and SettingName = 'uSecAction'
  1829. and PolicySettings.parentid in 
  1830.     (select b.parentid
  1831.     from #VirusScanPolicyIDs, PolicySettings b
  1832.     where
  1833.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1834.     and b.SectionName = 'Wrkstn_Default-Action'
  1835.     and b.SettingName = 'uAction'
  1836.     and b.Value = '3'
  1837.     )
  1838.  
  1839. update PolicySettings
  1840. set Value = '4'
  1841. where
  1842. SectionName = 'Wrkstn_Default-Action'
  1843. and SettingName = 'uAction'
  1844. and PolicySettings.parentid in 
  1845.     (select b.parentid
  1846.     from #VirusScanPolicyIDs, PolicySettings b
  1847.     where
  1848.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1849.     and b.SectionName = 'Wrkstn_Default-Action'
  1850.     and b.SettingName = 'uAction'
  1851.     and b.Value = '3'
  1852.     )
  1853.  
  1854. /* ----------------------------------------------------------------------------
  1855. [Server_Default-Action]                                            [Server_Default-Action]
  1856. uAction                                        = 5    (Clean)
  1857. uSecAction                                    = 3    (Move)        =>  = 4 (Delete)
  1858. ---------------------------------------------------------------------------- */
  1859. update PolicySettings
  1860. set Value = '4'
  1861. where
  1862. SectionName = 'Server_Default-Action'
  1863. and SettingName = 'uSecAction'
  1864. and PolicySettings.parentid in 
  1865.     (select b.parentid
  1866.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1867.     where
  1868.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1869.     and b.SectionName = 'Server_Default-Action'
  1870.     and b.SettingName = 'uAction'
  1871.     and b.Value = '5'
  1872.     and b.ParentID = c.ParentID
  1873.     and c.SectionName = 'Server_Default-Action'
  1874.     and c.SettingName = 'uSecAction'
  1875.     and c.Value = '3'
  1876.     )
  1877.  
  1878. /* ----------------------------------------------------------------------------
  1879. [Wrkstn_Default-Action]                                            [Wrkstn_Default-Action]
  1880. uAction                                        = 5    (Clean)
  1881. uSecAction                                    = 3    (Move)        =>  = 4 (Delete)
  1882. ---------------------------------------------------------------------------- */
  1883. update PolicySettings
  1884. set Value = '4'
  1885. where
  1886. SectionName = 'Wrkstn_Default-Action'
  1887. and SettingName = 'uSecAction'
  1888. and PolicySettings.parentid in 
  1889.     (select b.parentid
  1890.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1891.     where
  1892.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1893.     and b.SectionName = 'Wrkstn_Default-Action'
  1894.     and b.SettingName = 'uAction'
  1895.     and b.Value = '5'
  1896.     and b.ParentID = c.ParentID
  1897.     and c.SectionName = 'Wrkstn_Default-Action'
  1898.     and c.SettingName = 'uSecAction'
  1899.     and c.Value = '3'
  1900.     )
  1901.  
  1902. /* ----------------------------------------------------------------------------
  1903. [Server_Default-Action]                                            [Server_Default-Action]
  1904. uAction                                        = 4    (Delete)
  1905. uSecAction                                    = 3    (Move)        =>  = 7 (Deny)
  1906. ---------------------------------------------------------------------------- */
  1907. update PolicySettings
  1908. set Value = '7'
  1909. where
  1910. SectionName = 'Server_Default-Action'
  1911. and SettingName = 'uSecAction'
  1912. and PolicySettings.parentid in 
  1913.     (select b.parentid
  1914.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1915.     where
  1916.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1917.     and b.SectionName = 'Server_Default-Action'
  1918.     and b.SettingName = 'uAction'
  1919.     and b.Value = '4'
  1920.     and b.ParentID = c.ParentID
  1921.     and c.SectionName = 'Server_Default-Action'
  1922.     and c.SettingName = 'uSecAction'
  1923.     and c.Value = '3'
  1924.     )
  1925.  
  1926. /* ----------------------------------------------------------------------------
  1927. [Wrkstn_Default-Action]                                            [Wrkstn_Default-Action]
  1928. uAction                                        = 4    (Delete)
  1929. uSecAction                                    = 3    (Move)        =>  = 7 (Deny)
  1930. ---------------------------------------------------------------------------- */
  1931. update PolicySettings
  1932. set Value = '7'
  1933. where
  1934. SectionName = 'Wrkstn_Default-Action'
  1935. and SettingName = 'uSecAction'
  1936. and PolicySettings.parentid in 
  1937.     (select b.parentid
  1938.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  1939.     where
  1940.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1941.     and b.SectionName = 'Wrkstn_Default-Action'
  1942.     and b.SettingName = 'uAction'
  1943.     and b.Value = '4'
  1944.     and b.ParentID = c.ParentID
  1945.     and c.SectionName = 'Wrkstn_Default-Action'
  1946.     and c.SettingName = 'uSecAction'
  1947.     and c.Value = '3'
  1948.     )
  1949.  
  1950. /* ----------------------------------------------------------------------------
  1951. [Server_Default-Spyware]                                        [Server_Default-Spyware]
  1952. uAction_Program                                = 3    (Move)        =>  = 4 (Delete)
  1953. uSecAction_Program                            = 4    (Delete)    =>  = 7 (Deny)
  1954. ---------------------------------------------------------------------------- */
  1955. update PolicySettings
  1956. set Value = '7'
  1957. where
  1958. SectionName = 'Server_Default-Spyware'
  1959. and SettingName = 'uSecAction_Program'
  1960. and PolicySettings.parentid in 
  1961.     (select b.parentid
  1962.     from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
  1963.     where
  1964.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1965.     and b.SectionName = 'Server_Default-Spyware'
  1966.     and b.SettingName = 'uAction_Program'
  1967.     and b.Value = '3'
  1968.     and b.ParentID = c.ParentID
  1969.     and c.SectionName = 'Server_Default-Spyware'
  1970.     and c.SettingName = 'uSecAction_Program'
  1971.     and c.Value = '4'
  1972.     )
  1973.  
  1974. update PolicySettings
  1975. set Value = '4'
  1976. where
  1977. SectionName = 'Server_Default-Spyware'
  1978. and SettingName = 'uAction_Program'
  1979. and PolicySettings.parentid in 
  1980.     (select b.parentid
  1981.     from #VirusScanPolicyIDs, PolicySettings b
  1982.     where
  1983.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  1984.     and b.SectionName = 'Server_Default-Spyware'
  1985.     and b.SettingName = 'uAction_Program'
  1986.     and b.Value = '3'
  1987.     )
  1988.  
  1989. /* ----------------------------------------------------------------------------
  1990. [Wrkstn_Default-Spyware]                                        [Wrkstn_Default-Spyware]
  1991. uAction_Program                                = 3    (Move)        =>  = 4 (Delete)
  1992. uSecAction_Program                            = 4    (Delete)    =>  = 7 (Deny)
  1993. ---------------------------------------------------------------------------- */
  1994. update PolicySettings
  1995. set Value = '7'
  1996. where
  1997. SectionName = 'Wrkstn_Default-Spyware'
  1998. and SettingName = 'uSecAction_Program'
  1999. and PolicySettings.parentid in 
  2000.     (select b.parentid
  2001.     from #VirusScanPolicyIDs, PolicySettings b, TaskSettings c
  2002.     where
  2003.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  2004.     and b.SectionName = 'Wrkstn_Default-Spyware'
  2005.     and b.SettingName = 'uAction_Program'
  2006.     and b.Value = '3'
  2007.     and b.ParentID = c.ParentID
  2008.     and c.SectionName = 'Wrkstn_Default-Spyware'
  2009.     and c.SettingName = 'uSecAction_Program'
  2010.     and c.Value = '4'
  2011.     )
  2012.  
  2013. update PolicySettings
  2014. set Value = '4'
  2015. where
  2016. SectionName = 'Wrkstn_Default-Spyware'
  2017. and SettingName = 'uAction_Program'
  2018. and PolicySettings.parentid in 
  2019.     (select b.parentid
  2020.     from #VirusScanPolicyIDs, PolicySettings b
  2021.     where
  2022.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  2023.     and b.SectionName = 'Wrkstn_Default-Spyware'
  2024.     and b.SettingName = 'uAction_Program'
  2025.     and b.Value = '3'
  2026.     )
  2027.  
  2028. /* ----------------------------------------------------------------------------
  2029. [Server_Default-Spyware]                                        [Server_Default-Spyware]
  2030. uAction_Program                                = 5 (Clean)
  2031. uSecAction_Program                            = 3    (Move)        =>  = 4 (Delete)
  2032. ---------------------------------------------------------------------------- */
  2033. update PolicySettings
  2034. set Value = '4'
  2035. where
  2036. SectionName = 'Server_Default-Spyware'
  2037. and SettingName = 'uSecAction_Program'
  2038. and PolicySettings.parentid in 
  2039.     (select b.parentid
  2040.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  2041.     where
  2042.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  2043.     and b.SectionName = 'Server_Default-Spyware'
  2044.     and b.SettingName = 'uAction_Program'
  2045.     and b.Value = '5'
  2046.     and b.ParentID = c.ParentID
  2047.     and c.SectionName = 'Server_Default-Spyware'
  2048.     and c.SettingName = 'uSecAction_Program'
  2049.     and c.Value = '3'
  2050.     )
  2051.  
  2052. /* ----------------------------------------------------------------------------
  2053. [Wrkstn_Default-Spyware]                                        [Wrkstn_Default-Spyware]
  2054. uAction_Program                                = 5 (Clean)
  2055. uSecAction_Program                            = 3    (Move)        =>  = 4 (Delete)
  2056. ---------------------------------------------------------------------------- */
  2057. update PolicySettings
  2058. set Value = '4'
  2059. where
  2060. SectionName = 'Wrkstn_Default-Spyware'
  2061. and SettingName = 'uSecAction_Program'
  2062. and PolicySettings.parentid in 
  2063.     (select b.parentid
  2064.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  2065.     where
  2066.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  2067.     and b.SectionName = 'Wrkstn_Default-Spyware'
  2068.     and b.SettingName = 'uAction_Program'
  2069.     and b.Value = '5'
  2070.     and b.ParentID = c.ParentID
  2071.     and c.SectionName = 'Wrkstn_Default-Spyware'
  2072.     and c.SettingName = 'uSecAction_Program'
  2073.     and c.Value = '3'
  2074.     )
  2075.  
  2076. /* ----------------------------------------------------------------------------
  2077. [Server_Default-Spyware]                                        [Server_Default-Spyware]
  2078. uAction_Program                                = 4 (Delete)
  2079. uSecAction_Program                            = 3    (Move)        =>  = 7 (Deny)
  2080. ---------------------------------------------------------------------------- */
  2081. update PolicySettings
  2082. set Value = '7'
  2083. where
  2084. SectionName = 'Server_Default-Spyware'
  2085. and SettingName = 'uSecAction_Program'
  2086. and PolicySettings.parentid in 
  2087.     (select b.parentid
  2088.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  2089.     where
  2090.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  2091.     and b.SectionName = 'Server_Default-Spyware'
  2092.     and b.SettingName = 'uAction_Program'
  2093.     and b.Value = '4'
  2094.     and b.ParentID = c.ParentID
  2095.     and c.SectionName = 'Server_Default-Spyware'
  2096.     and c.SettingName = 'uSecAction_Program'
  2097.     and c.Value = '3'
  2098.     )
  2099.  
  2100. /* ----------------------------------------------------------------------------
  2101. [Wrkstn_Default-Spyware]                                        [Wrkstn_Default-Spyware]
  2102. uAction_Program                                = 4 (Delete)
  2103. uSecAction_Program                            = 3    (Move)        =>  = 7 (Deny)
  2104. ---------------------------------------------------------------------------- */
  2105. update PolicySettings
  2106. set Value = '7'
  2107. where
  2108. SectionName = 'Wrkstn_Default-Spyware'
  2109. and SettingName = 'uSecAction_Program'
  2110. and PolicySettings.parentid in 
  2111.     (select b.parentid
  2112.     from #VirusScanPolicyIDs, PolicySettings b, PolicySettings c
  2113.     where
  2114.     b.ParentID = #VirusScanPolicyIDs.AutoID3
  2115.     and b.SectionName = 'Wrkstn_Default-Spyware'
  2116.     and b.SettingName = 'uAction_Program'
  2117.     and b.Value = '4'
  2118.     and b.ParentID = c.ParentID
  2119.     and c.SectionName = 'Wrkstn_Default-Spyware'
  2120.     and c.SettingName = 'uSecAction_Program'
  2121.     and c.Value = '3'
  2122.     )
  2123.  
  2124. /* ----------------------------------------------------------------------------
  2125. [Server_General]                                                [Server_QuarantinePolicy]
  2126. szMoveToFolder=\quarantine                                    =>    szQuarantineDirectory=<SYSTEM_DRIVE>\quarantine
  2127.  ~OR~
  2128. szMoveToFolder=C:\quarantine                                =>    szQuarantineDirectory=C:\quarantine
  2129. ---------------------------------------------------------------------------- */
  2130. insert PolicySettings
  2131. (ParentID, SectionName, SettingName, Value)
  2132. select #VirusScanPolicyIDs.AutoID3, 'Server_QuarantinePolicy', 'szQuarantineDirectory', '<SYSTEM_DRIVE>' + b.Value
  2133. from PolicySettings b, #VirusScanPolicyIDs
  2134. where
  2135. b.ParentID = #VirusScanPolicyIDs.AutoID2
  2136. and b.SectionName = 'Server_General'
  2137. and b.SettingName = 'szMoveToFolder'
  2138. and b.Value like '\%'
  2139.  
  2140. insert PolicySettings
  2141. (ParentID, SectionName, SettingName, Value)
  2142. select #VirusScanPolicyIDs.AutoID3, 'Server_QuarantinePolicy', 'szQuarantineDirectory', b.Value
  2143. from PolicySettings b, #VirusScanPolicyIDs
  2144. where
  2145. b.ParentID = #VirusScanPolicyIDs.AutoID2
  2146. and b.SectionName = 'Server_General'
  2147. and b.SettingName = 'szMoveToFolder'
  2148. and b.Value not like '\%'
  2149.  
  2150. delete PolicySettings 
  2151. where 
  2152. PolicySettings.SectionName = 'Server_General'
  2153. and PolicySettings.SettingName = 'szMoveToFolder'
  2154. and PolicySettings.ParentID in 
  2155. (select 
  2156. AutoID 
  2157. from Policy, PolicySettings
  2158. where 
  2159. Policy.autoid = PolicySettings.parentid
  2160. and Policy.ProductCode = 'VIRUSCAN8700'
  2161. and Policy.ParentType in (6, 5, 4, 3, 1)
  2162. )
  2163.  
  2164. /* ----------------------------------------------------------------------------
  2165. [Wrkstn_General]                                                [Wrkstn_QuarantinePolicy]
  2166. szMoveToFolder=\quarantine                                    =>    szQuarantineDirectory=<SYSTEM_DRIVE>\quarantine
  2167.  ~OR~
  2168. szMoveToFolder=C:\quarantine                                =>    szQuarantineDirectory=C:\quarantine
  2169. ---------------------------------------------------------------------------- */
  2170. insert PolicySettings
  2171. (ParentID, SectionName, SettingName, Value)
  2172. select #VirusScanPolicyIDs.AutoID3, 'Wrkstn_QuarantinePolicy', 'szQuarantineDirectory', '<SYSTEM_DRIVE>' + b.Value
  2173. from PolicySettings b, #VirusScanPolicyIDs
  2174. where
  2175. b.ParentID = #VirusScanPolicyIDs.AutoID2
  2176. and b.SectionName = 'Wrkstn_General'
  2177. and b.SettingName = 'szMoveToFolder'
  2178. and b.Value like '\%'
  2179.  
  2180. insert PolicySettings
  2181. (ParentID, SectionName, SettingName, Value)
  2182. select #VirusScanPolicyIDs.AutoID3, 'Wrkstn_QuarantinePolicy', 'szQuarantineDirectory', b.Value
  2183. from PolicySettings b, #VirusScanPolicyIDs
  2184. where
  2185. b.ParentID = #VirusScanPolicyIDs.AutoID2
  2186. and b.SectionName = 'Wrkstn_General'
  2187. and b.SettingName = 'szMoveToFolder'
  2188. and b.Value not like '\%'
  2189.  
  2190. delete PolicySettings 
  2191. where 
  2192. PolicySettings.SectionName = 'Wrkstn_General'
  2193. and PolicySettings.SettingName = 'szMoveToFolder'
  2194. and PolicySettings.ParentID in 
  2195. (select 
  2196. AutoID 
  2197. from Policy, PolicySettings
  2198. where 
  2199. Policy.autoid = PolicySettings.parentid
  2200. and Policy.ProductCode = 'VIRUSCAN8700'
  2201. and Policy.ParentType in (6, 5, 4, 3, 1)
  2202. )
  2203.  
  2204. /* ----------------------------------------------------------------------------
  2205. [Server_Alerting]                                                        
  2206. -bMoveFiles
  2207. ---------------------------------------------------------------------------- */
  2208. delete PolicySettings 
  2209. where 
  2210. PolicySettings.SectionName = 'Server_Alerting'
  2211. and PolicySettings.SettingName = 'bMoveFiles'
  2212. and PolicySettings.ParentID in 
  2213. (select 
  2214. AutoID 
  2215. from Policy, PolicySettings
  2216. where 
  2217. Policy.autoid = PolicySettings.parentid
  2218. and Policy.ProductCode = 'VIRUSCAN8700'
  2219. and Policy.ParentType in (6, 5, 4, 3, 1)
  2220. )
  2221.  
  2222. /* ----------------------------------------------------------------------------
  2223. [Wrkstn_Alerting]                                                        
  2224. -bMoveFiles
  2225. ---------------------------------------------------------------------------- */
  2226. delete PolicySettings 
  2227. where 
  2228. PolicySettings.SectionName = 'Wrkstn_Alerting'
  2229. and PolicySettings.SettingName = 'bMoveFiles'
  2230. and PolicySettings.ParentID in 
  2231. (select 
  2232. AutoID 
  2233. from Policy, PolicySettings
  2234. where 
  2235. Policy.autoid = PolicySettings.parentid
  2236. and Policy.ProductCode = 'VIRUSCAN8700'
  2237. and Policy.ParentType in (6, 5, 4, 3, 1)
  2238. )
  2239.  
  2240. /* ----------------------------------------------------------------------------
  2241. [Server_Reporting]                                                        
  2242. -bLogUserName
  2243. ---------------------------------------------------------------------------- */
  2244. delete PolicySettings 
  2245. where 
  2246. PolicySettings.SectionName = 'Server_Reporting'
  2247. and PolicySettings.SettingName = 'bLogUserName'
  2248. and PolicySettings.ParentID in 
  2249. (select 
  2250. AutoID 
  2251. from Policy, PolicySettings
  2252. where 
  2253. Policy.autoid = PolicySettings.parentid
  2254. and Policy.ProductCode = 'VIRUSCAN8700'
  2255. and Policy.ParentType in (6, 5, 4, 3, 1)
  2256. )
  2257.  
  2258. /* ----------------------------------------------------------------------------
  2259. [Wrkstn_Reporting]                                                        
  2260. -bLogUserName
  2261. ---------------------------------------------------------------------------- */
  2262. delete PolicySettings 
  2263. where 
  2264. PolicySettings.SectionName = 'Wrkstn_Reporting'
  2265. and PolicySettings.SettingName = 'bLogUserName'
  2266. and PolicySettings.ParentID in 
  2267. (select 
  2268. AutoID 
  2269. from Policy, PolicySettings
  2270. where 
  2271. Policy.autoid = PolicySettings.parentid
  2272. and Policy.ProductCode = 'VIRUSCAN8700'
  2273. and Policy.ParentType in (6, 5, 4, 3, 1)
  2274. )
  2275.  
  2276. /* ----------------------------------------------------------------------------
  2277. [Server_UIPOptions]
  2278. UseUTF8=0
  2279. ---------------------------------------------------------------------------- */
  2280. insert PolicySettings
  2281. (ParentID, SectionName, SettingName, Value)
  2282. select #VirusScanPolicyIDs.AutoID3, 'Server_UIPOptions', 'UseUTF8', '0'
  2283. from PolicySettings b, #VirusScanPolicyIDs
  2284. where
  2285. b.ParentID = #VirusScanPolicyIDs.AutoID2
  2286. and b.SectionName = 'Server_UIPOptions'
  2287.  
  2288. /* ----------------------------------------------------------------------------
  2289. [Wrkstn_UIPOptions]
  2290. UseUTF8=0
  2291. ---------------------------------------------------------------------------- */
  2292. insert PolicySettings
  2293. (ParentID, SectionName, SettingName, Value)
  2294. select #VirusScanPolicyIDs.AutoID3, 'Wrkstn_UIPOptions', 'UseUTF8', '0'
  2295. from PolicySettings b, #VirusScanPolicyIDs
  2296. where
  2297. b.ParentID = #VirusScanPolicyIDs.AutoID2
  2298. and b.SectionName = 'Wrkstn_UIPOptions'
  2299. end 
  2300. go
  2301.  
  2302. /* ----------------------------------------------------------------------------
  2303. Done...
  2304. ---------------------------------------------------------------------------- */
  2305.  
  2306. if exists (select * from tempdb..sysobjects where name like '#VirusScanPolicyIDs%')
  2307. drop table #VirusScanPolicyIDs
  2308. go