Kaseya Community

Reading a registry value

This question is answered

I could be in the wrong place but I'm trying to read a registry key.  I thought this would be simple but I can't seem to find where to do this.  I see where I can test and check registry values but I'm not sure how to out put that somewhere I can read it.

Thanks,

Shane

Verified Answer
  • Sorry...yes you should use 'Get Variable'

All Replies
  • How are you trying to do it now? and what are you trying to do?

  • You cant 'read' a registry key, you can only check if it exists or not. This is because keys dont actually contain any data....only the values within it contain data (i.e REG_DWORD, REG_SZ etc).

    Keys are containers for values....much like folders are containers for files.

    Perhaps you are talking about reading a registry value?

  • I was trying to see if the Agent Procedures would read a registry key and output it somewhere, either a file I could grab or a report.

    I want to get the path for a users "My Documents" by reading:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal

    This key has the path.

    I could just write a vb script to do this but I figured Kaseya should be able to do this fairly easily.

    Thanks,

  • Sure, I'm looking for the String value of Key:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal

    It's a "REG_EXPAND_SZ" type.

  • OK....you are trying to read a Registry Value.

    Within your script, choose 'Get Variable' then within that select 'Registry Value'...put in the Value Path and give it a name etc.

    Then you can output that variable to a file...or within an email...or write it to another value etc.

     



    [edited by: joshua.niland at 1:13 PM (GMT -8) on 12-5-2010] now corrected for get variable
  • Thanks for the response.  I don't see a "Create Variable" option within the "Edit Procedure" window.  I do see a "Manage Variables" tool but I'm not sure if that is where I create this variable.

    I do see a "Get Variable" option in the Procedures window.  Is this what I should use?

  • Sorry...yes you should use 'Get Variable'