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 / 80To87_Policy_Upgrade_Script.sql < prev    next >
Text File  |  2007-10-05  |  74KB  |  2,311 lines

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