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: REGDB_STRING_EXPAND not working?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎May 01, 2009
06:20 PM
REGDB_STRING_EXPAND not working?
I'm having some trouble with getting the following code to expand the environment variable value returned in szValue. szValue contains "%windir%\system32\inetsrv". Should the following code not expand %windir% before it is returned into szValue?
Edit:
The machine this is having issues on is a Windows 2008 Server machine. When I run some test code on my XP machine using the exact same code the variable is expanded just as expected.
szName = "InstallPath";
nSize = -1;
nType = REGDB_STRING_EXPAND;
nResult = RegDBGetKeyValueEx( szKey, "InstallPath", nType, szValue, nSize );
Edit:
The machine this is having issues on is a Windows 2008 Server machine. When I run some test code on my XP machine using the exact same code the variable is expanded just as expected.
(3) Replies
‎May 07, 2009
02:37 PM
I don't have a Windows Server 2008 system at hand, but, if nothing else, does KB article Q101686 help?
(As an aside, RegDBGetKeyValueEx tells you what kind of data you just read, as opposed to the caller specifying what type of value it will read, so it shouldn't be necessary to set the type to REGDB_STRING_EXPAND beforehand.)
(As an aside, RegDBGetKeyValueEx tells you what kind of data you just read, as opposed to the caller specifying what type of value it will read, so it shouldn't be necessary to set the type to REGDB_STRING_EXPAND beforehand.)