moshi Posted June 10, 2010 Share Posted June 10, 2010 Hello everyone, I tries to insert a password for Vnc server by a RegWrite command, but have problem with that. The problem is that the password is showed in the registry as REG_BINARY type, When I export it, I get value like this: [HKEY_CURRENT_USER\Software\ORL\WinVNC3] "Password"=hex:49,90,e2,3d,ed,0b,be,3b And then when I put this value in the RegWrite command I don’t get the right value. I assume some conversion is needed. I read this thread http://www.autoitscript.com/forum/index.php?showtopic=107881&st=0&p=769989&hl=REG_BINARY&fromsearch=1&#entry769989 about creating a REG_BINARY entry but yet didn't what should I do or how to convert this " hex:49,90,e2,3d,ed,0b,be,3b" into the AutoIt RegWrite function. My line is this, but the value is not good RegWrite ( "HKEY_CURRENT_USER\Software\ORL\WinVNC3", "Password" ,"REG_BINARY"," 4990e23ded0bbe3b") Thanks for any help! Link to comment Share on other sites More sharing options...
JFX Posted June 10, 2010 Share Posted June 10, 2010 Try this: RegWrite("HKEY_CURRENT_USER\Software\ORL\WinVNC3", "Password" ,"REG_BINARY", binary("0x4990e23ded0bbe3b")) Link to comment Share on other sites More sharing options...
moshi Posted June 11, 2010 Author Share Posted June 11, 2010 That's working! thanks! Can you explain to me the logic behind this? every time I have binary I should add the "0x" to the exported regsitry data? Try this: RegWrite("HKEY_CURRENT_USER\Software\ORL\WinVNC3", "Password" ,"REG_BINARY", binary("0x4990e23ded0bbe3b")) Link to comment Share on other sites More sharing options...
JFX Posted June 11, 2010 Share Posted June 11, 2010 Can you explain to me the logic behind this? every time I have binary I should add the "0x" to the exported regsitry data?Well actually I see no sense to convert a already binary to a binary, but it was recommended in the topic you linked."Binary" always begins with "0x" so yes if you want to write REG_BINARY take the hex values from regedit and add a '0x' before it (of course remove the 'comma') 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