Forum Discussion

harlin000's avatar
harlin000
Copper Contributor
Jan 23, 2020
Solved

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

  • alexmarin89's avatar
    alexmarin89
    Iron Contributor
    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.
    • jvintzel's avatar
      jvintzel
      Former Employee

      harlin000 

       

      If the app is also under active development we recommend moving to a first launch action as opposed to a script.

       

      John.

Resources