edit registry from reg file

Associate
Joined
8 Mar 2007
Posts
2,176
Location
between here and there
Hey all,

I'm trying to change the value of a REG_EXPAND_SZ key, here is what I have;

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\PPP\EAP\13]
"ConfigUiPath"=C:\WINDOWS\system32\ratls.dll
"IdentityPath"=C:\WINDOWS\System32\ratls.dll
"InteractiveUIPath"=C:\WINDOWS\System32\ratls.dll
"Path"=C:\WINDOWS\System32\rastls.dll

when when I run it, it doesn't change the value.

I've tried this below, to stop it changiong the key from a REG_EXPAND_SZ to a REG_SZ data type, but it's still not working!!

"ConfigUiPath"=hexadecimal(2):c:\windows\system32\ratls.dll

I think the secound : might be causing the problem...

Has anone got any experenice with edititng the registry with .reg files???

Cheers in advance. :)
 
You need to double up the \ to escape code them so they all become \\

I changed it to;;

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\RasMan\PPP\EAP\13]
"ConfigUiPath"=C:\\WINDOWS\\system32\\ratls.dll


but it made no difference.

I've just exported the key and opened the reg file, I've noticed that the values are stored as hex. Do I have to work out the hex value of the string I'm trying to update it to???

(I hope not...)
 
looks like I cracked it;

I used the hex instead,

"ConfigUiPath"=hex(2):43,00,3a,00,5c,00,57,00,49,00,4e,00,44,00,4f,00,57,\
00,53,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,72,00,\
61,00,73,00,74,00,6c,00,73,00,2e,00,64,00,6c,00,6c,00,00,00

luckly, all the values are the same, so I only had to make one converstion.

Cheers for the help anyways!!
 
Back
Top Bottom