Software is Missing from Manage>Software and Software Catalog Views

book

Article ID: 158063

calendar_today

Updated On:

Products

Software Management Solution

Issue/Introduction

Numerous software components are missing from the Manage>Software and Software Catalog views but are visible in other places such as the Installed Software report, Manage>All Resources>Organizational Views>Default>All Resources>Software Component, and also Settings>All Settings>Notification Server>Console Settings>Views>Software>Software Catalog.

 There are no error messages seen or found.

Cause

Windows provides a feature where software can be flagged as hidden. Software Inventory detects this attribute and reports it to the Altiris database. Certain views in the console then filter out the software that is reported as hidden.

 

Environment

Prior to ITMS 7.5 SP1 release

Resolution

Temporary Solution: set all the hidden flags for the desired software to not hidden (0 instead of 1) using the SQL query below. The software will become visible in the console after running the NS.Nightly schedule to associate Software component to software product... task in Task Scheduler. However the software will become hidden again the next time software inventory runs.
 
UPDATE Inv_AddRemoveProgram
SET Hidden = 0
WHERE Inv_AddRemoveProgram._SoftwareComponentGuid in (SELECT comp.Guid
FROM vRM_Software_Component_Item comp
LEFT JOIN Inv_Software_Component_State swState
On swState._ResourceGuid = comp.Guid
LEFT JOIN (SELECT _SoftwareComponentGuid
FROM Inv_AddRemoveProgram
GROUP BY _SoftwareComponentGuid
HAVING SUM(Hidden) = COUNT(*))prog
ON comp.Guid = prog._SoftwareComponentGuid
LEFT JOIN Inv_Software_Component sc
ON sc._ResourceGuid = comp.Guid
WHERE comp.Name like '%Symantec Endpoint Protection%' -- Change to name of missing software release
--AND prog._SoftwareComponentGuid IS NOT NULL
AND ISNULL(sc.PMImport, 0) <> 1
AND comp.Name != ''
);

Permanent Solution for 7.5 SP1: Permanently disable the console from not showing hidden software using the two queries below. The queries alter two stored procedures and they may be incompatible with versions other than 7.5 SP1. Also this solution will unhide all hidden software, potentially cluttering and slowing down console views. The software will become visible in the console after running the NS.Nightly schedule to associate Software component to software product... task in Task Scheduler.

ALTER PROCEDURE spDeleteSoftwareComponent 
        AS 
        BEGIN 
         DECLARE @HiddenSoftware TABLE (Guid UNIQUEIDENTIFIER) 
         INSERT INTO @HiddenSoftware 
          SELECT _ResourceGuid  
          FROM Inv_Software_Component 
          WHERE PMImport = 1 
         UNION 
          SELECT Guid  
          FROM vRM_Software_Component_Item 
          WHERE Attributes & 1 = 1 
--Remove the union to Inv_AddRemovePrograms so that the Component state is not deleted
         --UNION 
         -- SELECT _SoftwareComponentGuid 
         -- FROM Inv_AddRemoveProgram 
         -- WHERE Hidden = 1  
   UNION 
    SELECT Guid  
    FROM RM_ResourceOperating_System 
    
         DELETE FROM Inv_Software_Component_State 
         WHERE _ResourceGuid IN (SELECT Guid FROM @HiddenSoftware)  
        END

 

ALTER PROCEDURE spSoftwareToProductAssociation     
      AS     
      SET NOCOUNT ON 
 
       CREATE TABLE #temp (Guid UNIQUEIDENTIFIER)   
 
      INSERT INTO #temp     
      SELECT DISTINCT sc.Guid    
      FROM dbo.vSoftwareComponent sc     
      JOIN dbo.Inv_Software_Component isc     
      ON isc._ResourceGuid = sc.Guid 
      --The next 4 lines were previously commented by development   
      --JOIN dbo.ResourceAssociation ra     
      --ON ra.ParentResourceGuid = sc.Guid     
      --AND ra.ResourceAssociationTypeGuid = '292DBD81-1526-423A-AE6D-F44EB46C5B16'     
      --JOIN dbo.vCompany vc     
      --ON vc._ResourceGuid = ra.ChildResourceGuid  
      JOIN Inv_InstalledSoftware iis 
      ON iis._SoftwareComponentGuid = sc.Guid   
      AND iis.InstallFlag = 1 
      LEFT JOIN dbo.Inv_AddRemoveProgram ap 
      ON ap._SoftwareComponentGuid = iis._SoftwareComponentGuid 
      AND ap._ResourceGuid = iis._ResourceGuid 
      WHERE sc.Guid NOT IN      
      (SELECT ChildResourceGuid FROM dbo.ResourceAssociation      
      WHERE ResourceAssociationTypeGuid = '9D67B0C6-BEFF-4FCD-86C1-4A40028FE483')   
      AND sc.Attributes & 1 <> 1 
--Removed so that hidden software can stay visible in the desired locations
      --AND (ap.Hidden = 0 or ap.Hidden IS NULL)  
 
 
      DECLARE @ttemp TABLE (Guid UNIQUEIDENTIFIER)   
 
      DECLARE @sql NVARCHAR (MAX)   
      DECLARE @IsManaged INT  
      DECLARE @Soft_Comp UNIQUEIDENTIFIER   
      DECLARE @Soft_Prod UNIQUEIDENTIFIER   
 
      INSERT INTO @ttemp    
      SELECT [_ResourceGuid] FROM Inv_SoftwareProductFilter 
 
      CREATE TABLE #temp_comp (Guid UNIQUEIDENTIFIER)   
 
      CREATE TABLE #temp_results ([ProductGuid] UNIQUEIDENTIFIER, [SoftwareComponentGuid] UNIQUEIDENTIFIER, [IsManaged] INT )   
 
      WHILE (((SELECT COUNT (1) FROM @ttemp) >= 1) AND ((SELECT COUNT (1) FROM #temp) >= 1))   
      BEGIN   
       SET @Soft_Prod = (SELECT TOP 1 Guid FROM @ttemp)  
       SET @IsManaged = (SELECT IsManaged FROM dbo.Inv_Software_Product_State WHERE _ResourceGuid = @Soft_Prod)   
       SET @sql = (SELECT 'INSERT INTO #temp_comp SELECT Guid FROM (' +  REPLACE (CAST ([SQLQueryFilter] AS NVARCHAR (MAX)),'Order By component.Name Asc','') + ') sc WHERE sc.Guid IN (SELECT Guid FROM #temp)' FROM Inv_SoftwareProductFilter 
       WHERE [_ResourceGuid] = @Soft_Prod)   
       EXEC (@sql)   
       INSERT INTO #temp_results   
       SELECT @Soft_Prod, Guid, @IsManaged   
       FROM #temp_comp   
       DELETE FROM @ttemp WHERE Guid = @Soft_Prod   
       DELETE FROM #temp_comp   
       DELETE FROM #temp WHERE Guid IN (SELECT [SoftwareComponentGuid] FROM #temp_results) 
      END   
       
      INSERT INTO #temp_results 
      SELECT sps._ResourceGuid, scs._ResourceGuid, sps.IsManaged FROM dbo.Inv_Software_Product_State sps 
      JOIN dbo.ResourceAssociation ra 
       ON ra.ParentResourceGuid = sps._ResourceGuid 
      JOIN dbo.Inv_Software_Component_State scs 
       ON scs._ResourceGuid = ra.ChildResourceGuid 
      WHERE sps.IsManaged <> scs.IsManaged 
 
      SELECT [ProductGuid], [SoftwareComponentGuid], [IsManaged] FROM #temp_results 
  
      DROP TABLE #temp_comp   
      DROP TABLE #temp_results   
      DROP TABLE #temp

 


Applies To

ITMS 7.X