@joebigelow / wix-1 / commits / 6d597c3f

Handle case where TMP isn't REG_EXPAND_SZ.

Bob Arnson committed Dec 24, 2022 at 21:40 UTC 6d597c3fdee0833007f206d2d29e19c2b44c5b4d
1 file changed +5
src/libs/dutil/WixToolset.DUtil/path3utl.cpp
+5
@@ -136,6 +136,11 @@ static HRESULT GetTempPathFromSystemEnvironmentVariable(
136 hr = EnvExpandEnvironmentStringsForUser(NULL, sczValue, psczPath, NULL);
137 PathExitOnFailure(hr, "Failed to expand environment variables for system in string: %ls", sczValue);
138 }
139 + else
140 + {
141 + hr = StrAllocString(psczPath, sczValue, 0);
142 + PathExitOnFailure(hr, "Failed to copy environment variable: %ls", wzName);
143 + }
144
145 hr = PathBackslashTerminate(psczPath);
146 PathExitOnFailure(hr, "Failed to backslash terminate system '%ls' value.", wzName);