From 995aec217bbb26c9c2a701cc77edb067ffbf8d36 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Wed, 8 Jan 2025 13:49:56 +0100 Subject: add ServiceLevel for service processes: User, AllUsers and Service --- src/zencore/process.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/zencore/process.cpp') diff --git a/src/zencore/process.cpp b/src/zencore/process.cpp index b1da034d2..11273a2b9 100644 --- a/src/zencore/process.cpp +++ b/src/zencore/process.cpp @@ -443,6 +443,10 @@ CreateProcNormal(const std::filesystem::path& Executable, std::string_view Comma { CreationFlags |= CREATE_NEW_CONSOLE; } + if (Options.Flags & CreateProcOptions::Flag_NoConsole) + { + CreationFlags |= CREATE_NO_WINDOW; + } const wchar_t* WorkingDir = nullptr; if (Options.WorkingDirectory != nullptr) @@ -588,6 +592,10 @@ CreateProcUnelevated(const std::filesystem::path& Executable, std::string_view C { CreateProcFlags |= CREATE_NEW_CONSOLE; } + if (Options.Flags & CreateProcOptions::Flag_NoConsole) + { + CreateProcFlags |= CREATE_NO_WINDOW; + } ExtendableWideStringBuilder<256> CommandLineZ; CommandLineZ << CommandLine; -- cgit v1.2.3