Quote msiexec arguments in the InstallerTests (#40566)

Blue committed May 18, 2026 at 10:02 UTC b2ba89de8074c65925e52a8c599ff45c777ff7a1
1 file changed +3 -3
test/windows/InstallerTests.cpp
+3 -3
@@ -190,13 +190,13 @@ class InstallerTests
190 auto productCode = GetMsiProductCode();
191 VERIFY_IS_FALSE(productCode.empty());
192
193 - CallMsiExec(std::format(L"/qn /norestart /x {} /L*V {}", productCode, GenerateMsiLogPath()));
193 + CallMsiExec(std::format(L"/qn /norestart /x \"{}\" /L*V \"{}\"", productCode, GenerateMsiLogPath()));
194 }
195
196 void InstallMsi()
197 {
198 PrepareForMsiOperation();
199 - CallMsiExec(std::format(L"/qn /norestart /i {} /L*V {}", m_msiPath, GenerateMsiLogPath()));
199 + CallMsiExec(std::format(L"/qn /norestart /i \"{}\" /L*V \"{}\"", m_msiPath, GenerateMsiLogPath()));
200 }
201
202 void InstallMsix() const
@@ -379,7 +379,7 @@ class InstallerTests
379 if (wsl::shared::string::EndsWith<wchar_t>(installerFile, L".msi"))
380 {
381 PrepareForMsiOperation();
382 - CallMsiExec(std::format(L"/qn /norestart /i {} /L*V {}", installerFile, GenerateMsiLogPath()));
382 + CallMsiExec(std::format(L"/qn /norestart /i \"{}\" /L*V \"{}\"", installerFile, GenerateMsiLogPath()));
383 }
384 else
385 {