Forum Discussion
harlin000
Jan 23, 2020Copper Contributor
Need configuration information added to .CONFIG file at MSIX install time.
I have a .NET application that has a client and a server component. The client component needs to know where the server component is located, i.e. machine name and port. This information varies according to the customers that have purchased this application. My current client installer is a .MSI file. This installer will prompt the user for the server machine name and port, edit the .CONFIG file, and install the updated .CONFIG file. If a silent install is used, then the information is passed in as properties.
Is there a way to create a MSIX package that allows the user to input this configuration information and update the .CONFIG file when the MSIX package is installed?
- Hi,
It’s not possible during install to achieve this. However, using the PSF, you can add a custom script (powershell) to run before opening the application.
Take the desired input from the script and change the file. If the file is present in the installation directory, you must also create a redirect for it in the appdata of the app.
In Advanced Installer we have a special section for the PSF called AppCompat where you can achieve this.
4 Replies
- alexmarin89Iron ContributorHi,
It’s not possible during install to achieve this. However, using the PSF, you can add a custom script (powershell) to run before opening the application.
Take the desired input from the script and change the file. If the file is present in the installation directory, you must also create a redirect for it in the appdata of the app.
In Advanced Installer we have a special section for the PSF called AppCompat where you can achieve this.