declare @packageId uniqueidentifier
declare PackageRemoval cursor for
--**** Collect package Guids
select Guid
from
vRM_Package_Item
--**** Exact names of the packages to be removed from all package lists.
where Name in (
'Antivirus Inventory Package component'
, 'Intel SCS 5.5.0.3 - Software Package Resource'
, 'Intel® SCS package'
, 'OOB Site Server Configuration Package'
, 'OOB Site Server Inventory Package'
, 'OOB Site Service Agent - Software Package Resource'
, 'Out of Band Discovery Package'
, 'Out of Band Site Service Agent package'
, 'Out of Band Task Plug-in Package'
, 'Symantec Endpoint Protection Uninstall Management'
)
--*******************
open PackageRemoval
fetch next from PackageRemoval into @packageId
while @@FETCH_STATUS = 0
begin
update RM_ResourceSoftware_Package set ProductUninstalled = 1 where Guid = @packageId
update RM_ResourcePackage set ProductUninstalled = 1 where Guid = @packageId
update NSInternal_ItemInstalled set ProductUninstalled = 1 where Guid = @packageId
delete from SWDPackageServer where PackageId = @packageId
delete from SWDPackageCodebase where PackageId = @packageId
fetch next from PackageRemoval into @packageId
end
close PackageRemoval
deallocate PackageRemoval