Software Invetory shows uninstalled Software - After upgrading to ITMS old Software Inventory information is not removed if any Software is uninstalled from the clients


Article ID: 156941


Updated On:


Management Platform (Formerly known as Notification Server)


If we install any software on a client run SW inventory it will be populated to the DB, uninstalling the software removes the entries from the DB as expected. However there are some historical information about SW which will not be removed if uninstalled on the client.



Historical SW inventory has different assocciations than newly discovered one after upgrading to 7.0 MR4


Running the below SQL query will wipe out all the SW inventory information for all the computer clients, Then run Software Inventory on all your clients.

-- Begin of SQL query --
Declare @ID int
Declare @Name varchar (max)
Declare @GUID uniqueidentifier
create table #vcomp
[id] bigint identity (1,1) not null,
[Name] varchar (max),
[GUID] uniqueidentifier
insert into #vcomp (Name, GUID)   (select name, guid from vComputer)
set @ID = '1'
set @GUID = (select GUID from #vcomp where ID = @ID)
while @GUID is not null
set @GUID = (select GUID from #vcomp where ID = @ID)
set @Name = (select Name from #vcomp where ID = @ID)
exec dbo.[sp_Inv_Installed_File_Details_resource_delete] @GUID
exec dbo.[sp_Inv_InstalledSoftware_resource_delete] @GUID
exec dbo.[sp_Inv_AddRemoveProgram_resource_delete] @GUID
print @Name
Print  @guid
set @ID = @ID + 1
drop table #vcomp
-- End of SQL query --

NB. It's highly recommended to take a full database back before applying the above workaround