AZHockeyNut wrote:
thanks Sean, any chance you can help figure out how to run a report on assets that shows 1) does it have windows.old and 2 does it have the feature installed to run cleanmgr?
The best way to create this report is to look for a file that will always be in the folder Windows.old. Lansweeper can't check if a folder exists, so you will need to use custom file scanning to see if the file within the folder exists.
I believe the feature needed for cleanmgr is called "Desktop Experience" (based on my google search). Unfortunately, the feature is a sub-feature of "User Interfaces and Infrastructure", and Lansweeper will only scan the main features (not sub-features that are installed). This means that even if "User Interfaces and Infrastructure" is installed, it does not mean that "Desktop Experience" is. The only alternative would be to find a registry key that indicates that it is enabled.
The report below will give back assets which have the feature "User Interfaces and Infrastructure" enabled, and the results of a file scan for a the file C:\Windows.old\filehere.txt, which you will have to change to a file which is always in the Windows.old folder (or subfolder).
Select Top 1000000 tblAssets.AssetID,
  tblAssets.AssetName,
  tblAssets.Domain,
  tblAssets.Username,
  tblAssets.Userdomain,
  Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
  tblAssets.IPAddress,
  tsysIPLocations.IPLocation,
  tblAssetCustom.Manufacturer,
  tblAssetCustom.Model,
  tsysOS.OSname As OS,
  tblAssets.SP,
  tblFeatureUni.featureCaption,
  tblAssets.Lastseen,
  tblAssets.Lasttried,
  TsysLastscan.Lasttime As LastFileScan,
  Case
    When TsysLastscan.Lasttime < GetDate() -
    1 Then
    'Last file scan more than 24 hours ago. Scanned data may not be accurate.'
  End As Comment,
  tblFileVersions.FilePathfull As PathSearched,
  Case tblFileVersions.Found When 1 Then 'Yes' Else 'No' End As FileFound,
  tblFileVersions.FileVersion,
  tblFileVersions.CreationDate,
  tblFileVersions.LastAccessed,
  tblFileVersions.LastModified,
  tblFileVersions.Lastchanged As LastChanged
From tblAssets
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
  Inner Join tsysIPLocations On tsysIPLocations.LocationID =
    tblAssets.LocationID
  Left Join tblFileVersions On tblFileVersions.AssetID = tblAssets.AssetID
  Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
  Inner Join tblState On tblState.State = tblAssetCustom.State
  Inner Join TsysLastscan On tblAssets.AssetID = TsysLastscan.AssetID
  Inner Join TsysWaittime On TsysWaittime.CFGCode = TsysLastscan.CFGcode
  Inner Join tblFeature On tblAssets.AssetID = tblFeature.AssetId
  Inner Join tblFeatureUni On tblFeatureUni.featUniID = tblFeature.featUniId
Where tblFeatureUni.featureCaption Like '%User Interfaces and Infrastructure%'
  And tblFileVersions.FilePathfull = 'C:\Windows.old\filehere.txt' And
  tblState.Statename = 'Active' And TsysWaittime.CFGname = 'files'
Order By tblAssets.Domain,
  tblAssets.AssetName,
  PathSearched