summaryrefslogtreecommitdiff
path: root/zen/shell_execute.h
diff options
context:
space:
mode:
Diffstat (limited to 'zen/shell_execute.h')
-rw-r--r--zen/shell_execute.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/zen/shell_execute.h b/zen/shell_execute.h
index ee8203c3..2f73fc38 100644
--- a/zen/shell_execute.h
+++ b/zen/shell_execute.h
@@ -38,7 +38,7 @@ bool shellExecuteImpl(Function fillExecInfo, ExecutionType type)
SHELLEXECUTEINFO execInfo = {};
execInfo.cbSize = sizeof(execInfo);
execInfo.lpVerb = nullptr;
- execInfo.nShow = SW_SHOWNORMAL;
+ execInfo.nShow = SW_SHOW;
execInfo.fMask = type == EXEC_TYPE_SYNC ? (SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NOASYNC) : 0;
//don't use SEE_MASK_ASYNCOK -> different async mode than the default which returns successful despite errors!
execInfo.fMask |= SEE_MASK_FLAG_NO_UI; //::ShellExecuteEx() shows a non-blocking pop-up dialog on errors -> we want a blocking one
@@ -98,7 +98,7 @@ void shellExecute(const Zstring& command, ExecutionType type) //throw FileError
{
filePath = argv[0];
for (auto it = argv.begin() + 1; it != argv.end(); ++it)
- arguments += (it != argv.begin() ? L" " : L"") +
+ arguments += (it == argv.begin() + 1 ? L"" : L" ") +
(it->empty() || std::any_of(it->begin(), it->end(), &isWhiteSpace<wchar_t>) ? L"\"" + *it + L"\"" : *it);
}
bgstack15