cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
greyclear
Engaged Sweeper III
Looking for a way to see what machines have UAC turned off/on is it do-able?
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
try this

SELECT TOP 1000000 tsysOS.Image AS icon, tblAssets.AssetID, tblAssets.AssetUnique, tblAssets.Domain, tblRegistry.Regkey,
tblRegistry.Valuename, tblRegistry.Value, tblRegistry.Lastchanged
FROM tblAssets INNER JOIN
tsysOS ON tsysOS.OScode = tblAssets.OScode INNER JOIN
tblRegistry ON tblAssets.AssetID = tblRegistry.AssetID INNER JOIN
tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
WHERE (tblRegistry.Regkey LIKE '%SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System') AND (tblRegistry.Valuename = 'EnableLUA') AND
(tblAssetCustom.State = 1)
ORDER BY tblRegistry.Value DESC

View solution in original post

5 REPLIES 5
Hemoco
Lansweeper Alumni
try this

SELECT TOP 1000000 tsysOS.Image AS icon, tblAssets.AssetID, tblAssets.AssetUnique, tblAssets.Domain, tblRegistry.Regkey,
tblRegistry.Valuename, tblRegistry.Value, tblRegistry.Lastchanged
FROM tblAssets INNER JOIN
tsysOS ON tsysOS.OScode = tblAssets.OScode INNER JOIN
tblRegistry ON tblAssets.AssetID = tblRegistry.AssetID INNER JOIN
tblAssetCustom ON tblAssets.AssetID = tblAssetCustom.AssetID
WHERE (tblRegistry.Regkey LIKE '%SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System') AND (tblRegistry.Valuename = 'EnableLUA') AND
(tblAssetCustom.State = 1)
ORDER BY tblRegistry.Value DESC
greyclear
Engaged Sweeper III
Perfect. How would I sort the results? I tried

Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.Domain,
tblRegistry.Regkey,
tblRegistry.Valuename,
tblRegistry.Value,
tblRegistry.Lastchanged
From tblAssets
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where tblRegistry.Regkey Like '%SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System'
And tblRegistry.Valuename = 'EnableLUA' And tblAssetCustom.State = 1
Order By tblAssetCustom.State

But it doesnt sort the result how I want. Id like to see it sort by UAC enabled first, or vice versa rather than in alphabetically order

I could just enter the number 1 in the search box of the report and it only shows those machines..

Thanks!
Hemoco
Lansweeper Alumni
See this example: http://www.lansweeper.com/kb/18/report-based-on-registry-keys.html
greyclear
Engaged Sweeper III
I figured as much I guess my question should of been how would I incorporate that into lansweeper.
Hemoco
Lansweeper Alumni
You can scan the registry for the current uac settings: http://www.petri.co.il/disable-uac-in-windows-7.htm#