‎11-28-2014 01:44 PM - last edited on ‎07-05-2023 01:41 PM by ErikT
We used this here to disable sleep on the windows 7 machines.
I made the last part make a log file in c:\gpo\sleep.txt and then used lansweeper to scan for the file using custom file scanning.
After I did a scan of all windows 7 machines I made a report to see what computers were missing the file sleep.txt and did a schedule deployment to fire it off after scan if if the file was missing.
If you do not modify the location of sleep.txt you can use this sql code to make a report on the machines that are missing the file or modify the tblFileVersions.FilePathfull with the location of the file that you create in the deployment.
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName As assetname,
tblAssets.Username As UserName,
tblFileVersions.FilePathfull As FileName,
tblFileVersions.Found As Found,
tblAssets.Lasttried As [Last Tried],
tblAssets.Lasttriggered As [last Triggered],
tblAssets.OScode As OperatingSystem
From tblAssets
Inner Join tblFileVersions On tblAssets.AssetID = tblFileVersions.AssetID
Where tblFileVersions.FilePathfull = 'c:\gpo\sleep.txt' And
tblFileVersions.Found = '0' And tblAssets.OScode = '6.1.7601' And
tblAssets.Assettype = -1
Order By assetname
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now