Forum Discussion
App-Manifest using customInstall
I don't think you will get this working. We tried to leverage the customInstall support in Advanced Installer too and the reply we got was a standard "no". As mentioned in the docs:
This element is currently intended to be used only by certain types of desktop PC games that are published by Microsoft and our partners.
Bogdan Mitrache Thank you! Well at least this leads me to "search for another way" instead of hoping ans trying to get this to work, then.
- Bogdan MitracheJul 03, 2020Iron Contributor
One option you can try is with the help of the Package Support Framework and it's support to run PowerShell scripts.
- TopperDELJul 03, 2020Copper Contributor
Bogdan Mitrache That's a nice hint! Powershell would be supported with Windows Store Apps, too?
Have to digg into this one, then. Seems to be a valid path to use. Thank you!
- Jul 05, 2020
TopperDEL If looking to use the PSF scripting support to run a PowerShell script, you need to be aware of the following:
- Microsoft changed how the scripts run in the OS level support. In earlier versions of the OS, these scripts ran outside of the container, but on the 2004 runtime, the scripts now run inside the container. I believe the change applies only to 2004 and beyond, but only Microsoft could confirm whether any back-porting of this change to the monthly fixes might apply to earlier versions. Please be sure to check your work against all target OSs that your customers might use.
- The PSF scripting has a setting to request the script to run inside or outside of the container. I do not believe that this setting ever had an effect.
I will also mention this. If the destination location to place files is outside of the folder coverage of files inside the package, files created by processed in the container are placed outside of the virtualized file system. For example, if you don't include any files in the Documents folder in the package, a file written will end up in the real documents folder.
Writing files outside of the container that are not intended for use by other applications is not in-line with Microsoft's "never regret" strategy with MSIX, where removal removes everything. So if you are talking about files only used by the app, consider if external writing is actually needed. When client-side customizations are needed, I have used an in-container script that writes to the redirected location (using the new %MSIXWritablePackageRoot% pseudo-variable supported by Psf Scripting) to solve the problem and support "never regret".