Can I pass parameters specific to an exe while launching it from a UWP app that has full trust capabilities?

507 Views Asked by At

In the Package.appmanifest we specify the GroupID and the parameters for launching an executable, for example - mstsc.exe. Can we also pass some parameters like mstsc /v:hostname? I have tried passing it that way but that hasn't worked. Is there a different way of doing this?

Thanks!!

1

There are 1 best solutions below

1
Stefan Wick  MSFT On BEST ANSWER

The FullTrustProcessLauncher API/extension can only launch EXEs that are included in the package. That EXE will receive the parameters you have specified in the manifest.

If you want to launch mstsc.exe (or any other EXE on the system outside of your package) you can do so by including a simple launcher EXE in your package that you launch via FullTrustProcessLauncher and it then takes care of launching the EXE you ultimately want to run, with the parameters of your choice.

I have a blog post with examples here (one of them actually launches mstsc.exe): https://stefanwick.com/2018/04/06/uwp-with-desktop-extension-part-2/