Native Support for Command Line Arguments

Native Support for Command Line Arguments



 Feb 11 2019
9 Comments (9 New)

Per my post here, MSIX packages need to be able to pass command line arguments to executed apps. This is presently not possible.


Without this capability, my ability to package legacy apps with MSIX is severely limited, and has forced me to stay with App-V.


We are looking into this item will update it shortly.

Community Manager
Status changed to: New

@TaylorBrown Hopefully Microsoft will allow what you asked at some point.


Until then, I updated the Package Support Framework to allow what you need..  The updates this week would allow you to replace the target of your current shortcut with a copy of PsfLaunchXX.exe, and then edit the config.json file to launch your target exe with command line arguments specified in the config.json.



Status changed to: In the backlog
Status changed to: Working on it
Copper Contributor

Would that include arguments from launching links from web. That is href ms-appinstaller with arguments for the application in the end?

Our clickonce application is using this type of setting.

Not sure; perhaps John knows.


Certainly there are likely differences depending on how you do it.  Two obvious choices:

  • Have PsfLauncher run the URL protocol reference. In other words "run the URL and use whatever protocol association is set for http(s)",
  • Have PsfLauncher run a browser exe as the target with the url being a command line argument to it.  I'd tend to try the latter when repackaging in a corporate environment because browser choice is often dictated, but if a developer is creating this package for many customers, the URL method is probably better. 

There is a possibility that the ultimate browser will start outside of the container which is probably not desirable; the result could depend on your choice above. So you'll have to test it. But keep in mind that what version of the PSF and what version of the OS Runtime you test on might change the inside/outside effect. (Which is where I'm hoping @John Vintzel might be able to shed some light).


The downside in specifying the browser exe to use in the json config directly is that you are enforcing that browser to be used. While Microsoft might feel Edge is the only answer here, the end-user might not agree with that mandate :smile:


This is avail using uap10:Parameters element on Windows 10 2004 or later


Application (Windows 10) - Windows UWP applications | Microsoft Docs


Status changed to: Completed