isma1949 Posted June 10, 2008 Share Posted June 10, 2008 I am trying to do a simple script to display a registry key. i am trying the read the following key HKEY_CURRENT_USER\Software\Smith Micro\VZAccess Manager-Verizon Wireless(Lenovo) The the actual part of the script is : $var = RegRead("HKEY_CURRENT_USER\Software\Smith Micro\VZAccess Manager-Verizon Wireless(Lenovo)", "DeviceESN") MsgBox( 4096,"ESN Number", $var) I just get a blank message box. I think the problem is with the .....(Lenovo) it is gagging on the ( ). Any body have any suggestions. Thanks for your help in advance. Link to comment Share on other sites More sharing options...
Kerros Posted June 10, 2008 Share Posted June 10, 2008 (edited) lets do some error checking real quick, see what RegRead says the error is. Try this, and check the help file for what the errors are. $var = RegRead("HKEY_CURRENT_USER\Software\Smith Micro\VZAccess Manager-Verizon Wireless(Lenovo)", "DeviceESN") If @error Then MsgBox(0,"Error","Error is "&@error) Else MsgBox( 4096,"ESN Number", $var) Endif Edit: Changed code to only show one messagebox Edited June 10, 2008 by Kerros Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance. Link to comment Share on other sites More sharing options...
LarryDalooza Posted June 10, 2008 Share Posted June 10, 2008 Did you type the... HKEY_CURRENT_USER\Software\Smith Micro\VZAccess Manager-Verizon Wireless(Lenovo) or use RightClick / Copy Key Name? Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
isma1949 Posted June 10, 2008 Author Share Posted June 10, 2008 lets do some error checking real quick, see what RegRead says the error is. Try this, and check the help file for what the errors are. $var = RegRead("HKEY_CURRENT_USER\Software\Smith Micro\VZAccess Manager-Verizon Wireless(Lenovo)", "DeviceESN") If @error Then MsgBox(0,"Error","Error is "&@error) Else MsgBox( 4096,"ESN Number", $var) Endif Edit: Changed code to only show one messagebox Link to comment Share on other sites More sharing options...
isma1949 Posted June 10, 2008 Author Share Posted June 10, 2008 I get an error of 1 " unable to open requested key" So it is not reading the key. I tried doing what LAR suggested below (copy key name" and it worked. I know my typing of the key was correct cause I had my partner checkit for me. So it must be some thing the copy keyname function. ??? Any way you are right --- I should looked at error code square one. Thanks for you help. 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