cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jannez
Engaged Sweeper
Hi All,

I'm trying to target the registry change script to report/ dynamic device group to devices that do not have it yet.

Scenario:

Machine A has regxyz therefore won't be in the report and won't be targeted for the next time scheduled deployment.
Machine B has regxyz but the wrong value, therefore, will be in the report and it will be targeted next time in scheduled deployment.
Machine C hasn't got regxyz therefore will be in the report and it will be targeted next time in scheduled deployment.

There might not even be the functionality I'm looking for as I was only able to report on machines that already have said registry entry.

I create a condition to look for the desired value to at least it won't run but it will check with the machine every time it's scheduled to run. It's not the end of the world but would prefer to only target this to machines that actually need it.



1 REPLY 1
Andy_Sismey
Champion Sweeper III
See if this report helps , this looks for the Firefox version and reports back OK, Blank or Wrong Value , it has a filter to remove the OK values

Select Top 1000000 tblassets.AssetID,
tblassets.AssetName,
tsysassettypes.AssetTypename,
tsysassettypes.AssetTypeIcon10 As icon,
tblassets.IPAddress,
tblassets.Lastseen,
tblassets.Lasttried,
Case
When [Correct-Reg].Value Is Not Null And [Correct-Reg].Value =
'98.0.2 (x64 en-GB)' Then 'OK'
When [Correct-Reg].Value Is Not Null And [Correct-Reg].Value Not Like
'%98.0.2% ' Then 'Wrong Value'
When [Correct-Reg].Value Is Null Then 'Blank'
End As Status
From tblassets
Inner Join tblassetcustom On tblassets.AssetID = tblassetcustom.AssetID
Inner Join tsysassettypes On tsysassettypes.AssetType = tblassets.Assettype
Left Join (Select tblRegistry.Valuename,
tblRegistry.AssetID,
tblRegistry.Regkey,
tblRegistry.Value
From lansweeperdb.dbo.tblRegistry
Where tblRegistry.Valuename = 'CurrentVersion' And
tblRegistry.Regkey Like '%SOFTWARE\Mozilla\Mozilla Firefox%' And
tblRegistry.Value Is Not Null) [Correct-Reg] On [Correct-Reg].AssetID =
tblassets.AssetID
Where Case
When [Correct-Reg].Value Is Not Null And [Correct-Reg].Value =
'98.0.2 (x64 en-GB)' Then 'OK'
When [Correct-Reg].Value Is Not Null And [Correct-Reg].Value Not Like
'%98.0.2% ' Then 'Wrong Value'
When [Correct-Reg].Value Is Null Then 'Blank'
End Not Like '%OK%' And tblassetcustom.State = 1