// If we found setup 'B7' resource, handle it.
if (setup_path->length() > 0) {
CommandString cmd_line;
+ PathString exe_path;
// Get the path to setup.exe first.
bool success = true;
- if (!GetSetupExePathFromRegistry(configuration, cmd_line.get(),
- cmd_line.capacity()) ||
+ if (!GetSetupExePathFromRegistry(configuration, exe_path.get(),
+ exe_path.capacity()) ||
+ !cmd_line.append(exe_path.get()) ||
!cmd_line.append(L" --") ||
!cmd_line.append(kCmdUpdateSetupExe) ||
!cmd_line.append(L"=\"") ||
ProcessExitCode exit_code = SUCCESS_EXIT_CODE;
if (success &&
- (!RunProcessAndWait(NULL, cmd_line.get(), &exit_code) ||
+ (!RunProcessAndWait(exe_path.get(), cmd_line.get(), &exit_code) ||
exit_code != SUCCESS_EXIT_CODE)) {
success = false;
}