Kaseya Community

Reading DWORD from Registry

  • Hi there,

    I´m trying to user the agent procedure getVariable() to read a DWORD from registry. I want to collect additional information for my windows installation. 

    I can read a StringValue without any problems. 

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseId

    1809 

    But the installDate is a REG_DWORD and gets the result 0 

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate

    0

    Can anyone help to understand the problem ?

    Greetings Till 

  • Addition to that.

    It looks like that the system user do not have the "rights" to read this.

    If I try to read it by PW Shell Script the script runs from my desktop and I get the right result from RegKey.

    If I use kaseyaAgent to run the Script(SYSTEM) the variable is also 0.

  • ! solved ! We found the solution.

    we do not understand why but. DWORD can only be read in 64 bit mode.

    After we use ... we get the right value

    executePowershellCommand64BitSystem

    getVariable("64-Bit Registry Value")