Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5


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.

Bob McMahan
Labels (1)
0 Kudos
(1) Reply
Flexera Alumni

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.
0 Kudos