PS execution strategy with MSIX updates ?

Occasional Contributor



I tested yesterday PS script execution at 1st APP EXE execution and it is working fine.


Now supposing I deliver MSIX v1.0.0 thru uSoft Store, with some features and PS script execution at 1st APP Exe execution.

What will happen when I will send updates or bug fixes to uSoft, related to its PS script execution ?

Will it executed again or not ?




4 Replies



Are you sure the script isn't executed every time you launch your app? (but it simply behaves differently because of the code from the script)


From what I know, there is no support to run the script only once.  My understanding is that scripts can run every time you launch and close your app (if you also added a script to run when you close the app).


Of course, from your script, you can define a check, to see if the script has run before, i.e. to check if the resource modified by the script is already in the state you wanted it to be, and in this case exit the script and continue with launching the application.



Hi @Bogdan Mitrache 


Sorry maybe my question is not enough clear :

I would like to know the expected behavior of MSIX in case of any update(s) coming from the Store, at PS script execution and supposing that this PS script is tuned with only one execution at 1st installation.

I would like to avoid it because asking elevating privilege (UAC)





It does not matter from where you install the app, if you set the RunOnce policy, it should not run it during an upgrade.


By the way, I haven't tried publishing an MSIX that uses PSF (scripts) in the store. You might get a rejection from Microsoft. From what I remember, when PSF was released its purpose was to serve enterprise LOB apps that are no longer under active development.  Apps that get published in the store are usually under active development and in such cases Microsoft updating the code of your app to handle any particular scenarios, instead of integrating the Package Support Framework.



@JF_BAUDE  Not related to your question about what happens during upgrade, but please be sure that you test your package/script combo on a variety of OS revisions. 


If you only test on 2004 you may find a surprise in different behavior when customers use an older OS.