Rhyono Posted December 30, 2012 Share Posted December 30, 2012 What would keep you from viewing a value (error code -1) and can/how do you get past that problem? Here's where I'm encountering the problem: $a = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography", "MachineGuid") MsgBox(0,'',$a & " " & @error) Link to comment Share on other sites More sharing options...
wurmz Posted December 30, 2012 Share Posted December 30, 2012 It failed for me as well, but when I changed it to a 64 bit key, it worked. Are you using a 64bit machine? $a = RegRead("HKEY_LOCAL_MACHINE64\SOFTWARE\Microsoft\Cryptography", "MachineGuid") MsgBox(0,'',$a & " " & @error) Rhyono 1 Link to comment Share on other sites More sharing options...
Rhyono Posted December 30, 2012 Author Share Posted December 30, 2012 (edited) Yeah, but I viewed other values just fine that way. Which is what causes me to not understand why it works for some but not others. Especially since I used regedit to view it using the path I mentioned. Your response still allowed for a simple workaround, though. Thanks. Edited December 30, 2012 by Rhyono Link to comment Share on other sites More sharing options...
wurmz Posted December 30, 2012 Share Posted December 30, 2012 This may work better for you: If @OSArch = "X86" Then $kLM = "HKLM" Else $kLM = "HKLM64" EndIf $a = RegRead( $kLM & "\SOFTWARE\Microsoft\Cryptography", "MachineGuid") MsgBox(0,'',$a & " " & @error) Props where props are due: Link to comment Share on other sites More sharing options...
Rhyono Posted December 30, 2012 Author Share Posted December 30, 2012 That's what I already ended up doing. Thanks though. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now