→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
01-24-2024 03:03 PM
Hello,
i need a specific sql query for tblAutorunUNI.command "C:\Program Files\Microsoft OneDrive\OneDrive.exe" /background" , that reports all clients, if the command exists or not exists.
Doing a query for is not like 'C:\Program Files\Microsoft OneDrive\OneDrive.exe' reports all other autorun commands too.
01-25-2024 05:50 AM
Try this
Select Top (1000000) tblAssets.AssetID,
tblAssets.Domain,
tblAssets.AssetName,
tblAutorunUni.Caption,
tblAutorunUni.Command,
tblAutorunUni.CreationDate,
tblAutorun.Lastchanged
From tblAssets
Inner Join tblAutorun On tblAssets.AssetID = tblAutorun.AssetID
Inner Join tblAutorunUni On tblAutorun.AutorunUNI = tblAutorunUni.AutorunUNI
Where tblAutorunUni.Command Like '%\OneDrive.exe" /background'
Order By tblAutorun.Lastchanged Desc
01-25-2024 10:05 AM
Thx,
but this report will only show all assets where the command line exists.
I need a report, that shows all assets where the command line exists or not exists, you know.
All information in one report.
01-25-2024 11:17 AM
IMHO, it is useless but take SQL:
Select Top 1000000 tblAutorun.assetid,
tblAssets.assetname,
tblAutorunUni.Command,
Count(tblAutorunUni.Command) onedrive_present
From tblAssets
Inner Join tblAutorun On tblAssets.AssetID = tblAutorun.AssetID
Left Join tblAutorunUni On tblAutorun.AutorunUNI = tblAutorunUni.AutorunUNI
And tblAutorunUni.Command Like '%\OneDrive.exe" /background'
Group By tblAutorun.assetid,
tblAssets.assetname,
tblAutorunUni.Command
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now