MSIX with Pre-requisites

Copper Contributor
Hello Team,
We have MSI file which was created from Visual Studio 2017 and i am trying to convert the MSI file into MSIX.
My MSIX packaging tool installed properly and I just want to know how to add pre-requisites in MSIX so that MSIX will automatically install if not found.
Our application want below pre-requisites
1..Net Framework 4.6.1
2.Crystal Report Runtime 32& 64 Bit (13.0.24)
One more thing that how i can change the installation path currently it save on (C:\Program Files\WindowsApp)




Thanks & Regards

10 Replies

I see John missed this one.


With the exception of Win7 backrev deployment, .Net 4.6.1 is guaranteed to be there.  MSIX does have a way to indicate package dependencies, but within the MSIX tool this means manually editing the AppXManifest.


Most of the time, I expect that an MSIX based app that needs Crystal Reports runtime available will need it available within the app MSIX container.  So an external "native" install or even a unrelated MSIX package listed as a package dependency won't meet your needs so going this dependency route will probably not go well for you. 


You probably can package up Crystal Reports Runtime in an MSIX package, and then your app that depends on it as an Add-On package (Modification package in MSIX Packaging Tool parlance), except that (currently) modification packages don't get shortcuts and you need one (or more) of those.   


So if you have to put the shortcut into CRR, given these limitations today I'd just make a single package with both parts.  It's not as bad of idea as it sounds, as you probably aren't going to change CRR on it's own and you have single instance download and storage at the block level.  So no matter how many packages you build with the CRR in it, you still only download and store it once on the client.






@Tim Mangan 



I have a similar problem. I would like to ship an app as an .msix. This app needs to have Sql Server Localdb installed. Our current installer (made by installshield) checks if Localdb is installed, and if not installs it (after having asked the user for permission). 

Is it possible to achieve something like that with msix?

Changes made by Microsoft to the PSF may be the best way to go. In your package include the PsfLauncher EXE and PsfRuntime DLL and config.json file. Make PsfLauncher the target of the shortcut. Configure the json file to have PsfLauncher run a script before starting the real app. The script must be in PowerShell, perform the check and install if necessary. There may be a UAC prompt. Not sure what to do with that one, though.

@Tim Mangan 

Thanks for your reply Tim. I've tried to add the psf files plus a config.json to my to my "Windows Application Packaging Project", but I'm not really sure how to continue from here. Is there any example of this that you can direct me to?

Also a beginner when it comes to Powershell scripting. Do you know of any good resource for checking and installing an app from powershell. 

@FredrikDahlberg I built some tooling to help with the Psf, but it only works for repackaging scenarios, not in package build projects. 


There are lots of good online resources for PowerShell, and by now you've probably found a few. But if not, all you'd really need is enough PowerShell knowledge to have a ps1 file that runs a cmd.exe process with arguments "/c  filename.cmd" and you can then have a cmd script instead. (Similarly if you prefer cscript you can start a cscript.exe command line).


Someday maybe I'll extend the Psf scripting to support directly specifying a cmd, cscript, or wscript file in addition to the ps1 filetype, but it isn't very high on my priority list.


@Tim Mangan 


Would another option be to install the server during convert time of the MSI?


I've ran into this issue when apps use Java.  When running the MSIX packaging tool I first install Java then I run the msi.  That way Java is installed in the package.

@Darren_Hoehna  I am guessing that the Sql Server LocalDB is a service which is why I was thinking about scripts.  But now support for services was announced at Ignite, and can be tested now using Insider builds of the packaging tool and insider build of the 2020H1 OS. You wouldn't need the packaging tool, except maybe to do a test capture to learn the manifest syntax that would have to be manually added to the manifest file.


This option wasn't available when this thread started, but could be tried now.

@Tim Mangan 


Ahh.  Yes.  if localDB is a service then my first option may not work.  So, maybe the localDB installer can be packaged with the app and a script can be useeat startup to install the service.


Basically what you said.



If you to use PSF scripts to install SQL server from the App Packaging project you need to:

  1. Add PsfLauncher*.exe, PsfRunDLL*.exe, PsfRuntime*.dll, and StartingScriptWrapper.ps1 to your package
  2. Make a config.json file. 
  3. Make your own .ps1 file that will install SQL 
    I found a few inks that may be helpful:
  4. Add the script to the config.json


If everything is right the script will start when the app starts and install SQL.


You can also add an ending script that will shut down SQL when the app exits.


Hope this helps.



@Darren_Hoehna SQL Server LocalDB is not a service, the exe is called up on demand by the main application.


I wish you the best of luck getting it to work though, in App-V the exe crashes and restarts repeatedly!