0

I want to launch an exe passing parameters to it. However, the documentation doesn't explain how to do that. It just mentions a parameterGroupId which is described as

The parameter group ID for the parameters that will be passed to the launched process.

So how do I provide the exe with parameters?

EDIT

I mean that I want a dynamically created value to be passed to the exe as an argument. Not something that I need to compile with the app.

ispiro
  • 26,556
  • 38
  • 136
  • 291
  • Did you look at the sample XML? https://learn.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.FullTrustProcessLauncher#Remarks – mjwills Mar 12 '18 at 20:28
  • @mjwills Can you please explain that a little bit more. We already know that it needs to be a string identifier of some group. The only thing added there is another string besides that. But what is that other string? I still don't know what I'm supposed to do to pass an `int` `i` to the exe. – ispiro Mar 12 '18 at 20:32
  • What do you think ` ` does? – mjwills Mar 12 '18 at 22:05
  • @mjwills Probably passes "/Sync" as an argument. I want to pass an arbitrary dynamically created argument. If the app decides to launch the process with argument "abc" - then that's what I want it to do. – ispiro Mar 12 '18 at 22:07
  • I hope this can help. [https://stackoverflow.com/questions/49189353/uwp-how-to-start-an-exe-file-that-is-located-in-specific-directory](https://stackoverflow.com/questions/49189353/uwp-how-to-start-an-exe-file-that-is-located-in-specific-directory) – neo Mar 26 '18 at 05:36

1 Answers1

0

It can't be done. At least not directly.

See https://stackoverflow.com/a/46009106/939213 .

What this parameterGroupId does is something else. It allows to send one of predefined parameters. And this parameterGroupId just chooses between them.

ispiro
  • 26,556
  • 38
  • 136
  • 291