Kaseya Community

Checking for Registry Keys & Values

This question is answered

Hi Kaseya Friends, 

I am trying to create an Agent Procedure to run on our Kaseya agents on our domain that test for three registry keys and their values. I am also looking to write the results of this procedure to a network share. 

Is this possible? How would I go about scripting this out?

Thanks! 

Heather 

Verified Answer
  • Ditto no point in checking for ControlSet001 and ControlSet002. Some computers won't even have ControlSet002 as it depends on the number of backups.

    The other problem that you will run into is that not all physical network cards us the 0007 registry key. I know this as I looked into making changes for Wake on LAN in the past and I found that depending on the number of virtual and physical network adapters the registry key name could change.

    For example the physical network adapter on my laptop is under;

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0010

    What you want can be done but would require scripting in something that is a little more advanced like VBscript or Powershell.

All Replies
  • Can you supply the 3 registry keys?

  • [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0007]

    "LinkNegotiationProcess"="2"

    [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0007]

    "LinkNegotiationProcess"="2"

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0007]

    "LinkNegotiationProcess"="2"

  • you can run the check registry and retrieve the value into an AP variable... then run a command on command line to echo that variable and >> to the \\netshare\result.txt

    i would suggest putting in the machine name with the variable to tie them together

    so something like this would do :

    #vmachine.machine_groupID# - #var# For Registry test 1.

  • You only need to modify CurrentControlSet, so scrap the other two from your script.

    "The most valuable and reliable control set is CurrentControlSet. If you need to modify system settings in the Registry, CurrentControlSet is the best subkey to choose because you know that it is the correct control set. You also know that if your modifications harm your system configuration, you will still be able to boot using the last known good control set."

    support.microsoft.com/.../100010

  • Ditto no point in checking for ControlSet001 and ControlSet002. Some computers won't even have ControlSet002 as it depends on the number of backups.

    The other problem that you will run into is that not all physical network cards us the 0007 registry key. I know this as I looked into making changes for Wake on LAN in the past and I found that depending on the number of virtual and physical network adapters the registry key name could change.

    For example the physical network adapter on my laptop is under;

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\0010

    What you want can be done but would require scripting in something that is a little more advanced like VBscript or Powershell.