Forum Discussion
MSIX Command Line Argument
It is supported using the package support framework (http://aka.ms/msix-psf). We are working on a more detailed implementation doc for this on the main docs site (http://aka.ms/msix). We hope to have that live (with a couple other psf docs) next week.
John.
jvintzelHi John, I see from the article here:
https://docs.microsoft.com/en-us/windows/msix/psf/psf-launch-apps-with-parameters
we can put arguments into the config.json file inside the package to have the Launcher64.exe pass those arguments to the installed application when it is launched.
What I need to do is pass a query string to the MSIX package from a link on a web page using the appinstaller and have that query string passed as an argument to the installed application when it is launched. Is there a way to do this?
Thank you,
Brett Burgeson
- Bogdan MitracheOct 06, 2020Steel Contributor
Hi BrettBurgeson,
It seems you can now pass query params to your applications deployed via an MSIX and the App Installer
- Passing installation parameters to a Windows application with MSIX and App Installer
Bogdan
- BrettBurgesonOct 06, 2020Brass Contributor
Bogdan Mitrache That is good news. Thank you for the update.
- May 28, 2020
I have been thinking about your scenario further, and have a suggestion for your consideration.
If I understand the problem correctly, in the end, your request is one about modifying the behavior of the application based on information that is only available at the time of installation. Before MSIX, this was accomplished by building a specialized shortcut at the time of the installation that added command line parameters with the required information obtained from the query string.
We have been discussing ways to get the equivalent using the Psf, but this might not be the best way. While it is "nice" to think about keeping everything inside the package, you should consider having the package be generic and having the installation experience configure an external reference with the needed data.
For this to work, the package shortcut would go to a launcher program that would read this data and start the app with appropriate command line arguments. This could be an special exe someone writes, or you could use PsfLauncher to start a cmd file with that logic.
As to the data, that could be placed in a native file or registry. Your installation experience would be one that creates the data file/reg from the query string and then just runs AppInstaller to install the app. This might not be a pure "MSIX" approach, but it might get the job done.
- BrettBurgesonMay 28, 2020Brass Contributor
- jvintzelMay 18, 2020Former Employee
Right now we do not support passing an argument from the installation URI to an installed app. Its something that we talked about, but not available today. I recommend adding an Feature Idea to the ideas section of the community.
John Vintzel (@jvintzel)
PM Lead, MSIX