This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: regdbgetkeyvalueex reads garbage string.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 24, 2010
02:00 AM
regdbgetkeyvalueex reads garbage string.
hi !!!
I have the following code to read path string from the registry.
-------------------------------------
szKey = "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment";
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
RegDBGetKeyValueEx (szKey, "Path" , nvType, svNumValue, nvSize);
//SprintfBox(MB_YESNO,"TITLE","size : %d, data : %s",nvSize, svNumValue);
nResult = RegDBSetKeyValueEx(szKey, "Path", REGDB_STRING_EXPAND, TARGETDIR^"\\bin\\;" + svNumValue , -1);
--------------------------------------
in Window7 (64 bit),
the svNumValue (after RegDBGetKeyvalueEx) has some garbage string at the end of path string.(like this --> "C:\Program files (x86)\PHP\.........;C:\phython26^!@#$")
This is not occurred in other OS.
I checked the key value manually in the registry.(There is no garbage string)
The garbage string is different every time.
how can I solve this???
Thanks...
I have the following code to read path string from the registry.
-------------------------------------
szKey = "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment";
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
RegDBGetKeyValueEx (szKey, "Path" , nvType, svNumValue, nvSize);
//SprintfBox(MB_YESNO,"TITLE","size : %d, data : %s",nvSize, svNumValue);
nResult = RegDBSetKeyValueEx(szKey, "Path", REGDB_STRING_EXPAND, TARGETDIR^"\\bin\\;" + svNumValue , -1);
--------------------------------------
in Window7 (64 bit),
the svNumValue (after RegDBGetKeyvalueEx) has some garbage string at the end of path string.(like this --> "C:\Program files (x86)\PHP\.........;C:\phython26^!@#$")
This is not occurred in other OS.
I checked the key value manually in the registry.(There is no garbage string)
The garbage string is different every time.
how can I solve this???
Thanks...
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jul 07, 2010
08:09 AM
Hi,
I tried your code on my Win7 x64 and it woked. Do you use svNumValue for the first time in this script?
I tried your code on my Win7 x64 and it woked. Do you use svNumValue for the first time in this script?
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)