Forum Discussion
MSIX Command Line Argument
Is there any update on allowing parameters to be specified to the MSIX package that get passed on to the installed application? My application needs environment specific data on the command line that can be different for each installation environment without creating a whole new package for each environment.
Thank you, Brett
Can you give us more details about the command line that you need to set? From what I see you said it depends on the target machine. Is it a file/folder path that can be different for each machine?
I am asking because in Advanced Installer we try to handle all these MSIX limitations with generic solutions that apply to multiple use cases. For example, now we are working on extending our private PSF fork to support expanding folder IDs or environment variables, like ProgramFilesFolder to "C:\Program Files". This path expansion can occur in a config file that gets installed or in a shortcut command line.
I am curious to better understand the specifics for your scenario.
Thanks,
Bogdan
- BrettBurgesonApr 06, 2020Brass Contributor
Thank you for your response.
We are trying to replace our click once installers with an up to date installer platform.
We have customers that have multiple users that need to be able to install our application from a web server that our customers maintain. Currently the click once link supplies an argument with a path to a config file. The path to the config file is of course unique to the customer but not to each machine.
We need to do the same thing with our new installer. MSIX can do that with the PSF but the package needs to be opened and the config file updated with the argument specific to the customer and repacked. We would like to avoid that step if possible so we can just have our Azure Devops pipeline produce an installer that we don't have to open up to modify the argument.
One more thing is that MSIX requires the user of MSIX Core to install on versions earlier than Windows 10 build 1709. At this point I'm having trouble getting MSIX Core to build successfully.
Thank you,
Brett
- Bogdan MitracheApr 09, 2020Iron Contributor
For this scenario I am thinking you could do this in a different way.
First, when your customers host the MSIX file on their servers, their should make it available for download using an .appinstaller file. It's a simple XML which they can write.
Now, at runtime, your app can detect the link used by the appinstaller. You can use a simple PowerShell script to get that link and save it into the registry. Then using the PSF launcher you can read that link from the registry (every time your app launches) and launch your app with a different command line (or whatever the customization was made by your clients), depending on the link it reads.
Is this what you would like? (I can provide a sample script and demo project in Advanced Installer if you want)- BrettBurgesonApr 09, 2020Brass Contributor
That sounds promising. Yes I would like a sample.
MSIX containers change how programs interact with the registry. This still works in a container?
How can I contact you offline?