View previous topic :: View next topic |
Author |
Message |
JayDee Newbie
Joined: 10 Apr 2002 Posts: 10 Location: Netherlands
|
Posted: Mon Jul 07, 2003 7:30 am Post subject: XREG3 registry read problem |
|
|
Hi guys,
After getting an 'undeliverable' error when sending my question to Ralph Ludwig (developer of XREG3.DLL), I decided to post it here in order to get some info. I'm wondering if you can help me with this one...
Purpose of the tool I wrote is to read the content of HKLM\Software\Microsoft\CurrentVersion,DevicePath, check if a specified path is in this string and then add or delete it.
This certain registry type is STRING_EXPAND_SZ, so it can't be read by VDS3.5 (which was why I use XREG3.DLL instead).
Now, I've found that the information that is returned from the registry read operation sometimes is altered, mainly when multiple signs like '%' or ';' are used.
Example:
If my registry contains: %systemroot%;%systemroot%\inf
...and I use this code to read the value:
XREG read
%%RegContent = @XREG(HLM,SOFTWARE\Microsoft\Windows\CurrentVersion,DevicePath)
...%%RegContent contains: %systemroot%;%systemroot%\infy (notice the y at the end).
If I would write this registry key back to the registry, it would contain incorrect information.
Did anyone of you see this problem or has a solution for it? Is there an alternative to XREG3.DLL, which can also read and write to REG_EXPAND_SZ registry types (or can do more operations in the registry)?
Thanks for your help.
JayDee |
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Mon Jul 07, 2003 9:12 am Post subject: |
|
|
If there is some regularity in the error eg.
It always puts a y at end for a given string and z at begining for some other then you can check for these characters using @substr function and deleting off the extraneous character however if it's random then .. I don't know. May be some one has a better idea. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
JayDee Newbie
Joined: 10 Apr 2002 Posts: 10 Location: Netherlands
|
Posted: Mon Jul 07, 2003 9:19 am Post subject: |
|
|
Hi,
The character is not always added, and it's not always a y. It can be other characters aswell. So if I don't know the content of the registry key (which is the case in 99%), I can't predict or test if a certain character was added or not.
Regards,
JayDee |
|
Back to top |
|
|
Rubes_sw Valued Contributor
Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Mon Jul 07, 2003 11:41 am Post subject: |
|
|
Did you try Tommys vdsdll.dll (version 3) . belive it registry read and write commands and functions. That work with vds3 & vds 4
Nathan |
|
Back to top |
|
|
JayDee Newbie
Joined: 10 Apr 2002 Posts: 10 Location: Netherlands
|
Posted: Mon Jul 07, 2003 2:35 pm Post subject: |
|
|
Hi Nathan,
Yes, this was the one I was looking for. I didn't realize that these registry functions were included in VDSDLL
Thanks for the help!
JayDee |
|
Back to top |
|
|
|