Search code examples
c#c++winapiuwpdesktop-bridge

Launch background win32 console application in UWP


A Win32 console application can be launched by

create_task(Windows::ApplicationModel::FullTrustProcessLauncher::LaunchFullTrustProcessForCurrentAppAsync()).then([&] {});

and

await Windows.ApplicationModel.FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();

following AppService Bridge Sample. A commond window is displayed even I don't want to input/output anything. I don't find any parameter like SW_HIDE in CreateProcess. How to launch background win32 console application in UWP?


Solution

  • In the project settings for the Win32 process, change the output type from Console Application to Windows Application, like this:

    enter image description here

    Thanks, Stefan Wick - Windows Developer Platform