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
- :
- Reg_string_expand
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
Sep 17, 2009
04:41 PM
Reg_string_expand
I'm updating a Installscript installation. I am trying to read a registry value that is a type REG_STRING_EXPAND. I receive back the value, but the symbolic section is still contained in the string. For example I retrieve back %WINSYSDIR%\inetpub\wwwroot. Is there a simple way to convert this to c:\inetput\wwwroot. I'm trying to run an application in the root wwwroot directory, but as this can be moved by the system administrator, I need to locate it via the registry, but on Win7, with the symbolic variable, my LaunchAppAndWait fails as it can't find the file.
Thanks,
Bob McMahan
Thanks,
Bob McMahan
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 17, 2009
05:19 PM
There's an ExpandEnvironmentStrings Windows API function you can use, which I gather is the most common solution. An alternative is to take the string apart yourself and call GetEnvVar.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)