PS execution strategy with MSIX updates ?

%3CLINGO-SUB%20id%3D%22lingo-sub-1758954%22%20slang%3D%22en-US%22%3EPS%20execution%20strategy%20with%20MSIX%20updates%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1758954%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tested%20yesterday%20PS%20script%20execution%20at%201st%20APP%20EXE%20execution%20and%20it%20is%20working%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20supposing%20I%20deliver%20MSIX%20v1.0.0%20thru%20uSoft%20Store%2C%20with%20some%20features%20and%20PS%20script%20execution%20at%201st%20APP%20Exe%20execution.%3C%2FP%3E%3CP%3EWhat%20will%20happen%20when%20I%20will%20send%20updates%20or%20bug%20fixes%20to%20uSoft%2C%20related%20to%20its%20PS%20script%20execution%20%3F%3C%2FP%3E%3CP%3EWill%20it%20executed%20again%20or%20not%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERgds%3C%2FP%3E%3CP%3EJF%20BAUDE%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1764014%22%20slang%3D%22en-US%22%3ERe%3A%20PS%20execution%20strategy%20with%20MSIX%20updates%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1764014%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F814739%22%20target%3D%22_blank%22%3E%40JF_BAUDE%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20you%20sure%20the%20script%20isn't%20executed%20every%20time%20you%20launch%20your%20app%3F%20(but%20it%20simply%20behaves%20differently%20because%20of%20the%20code%20from%20the%20script)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFrom%20what%20I%20know%2C%20there%20is%20no%20support%20to%20run%20the%20script%20only%20once.%26nbsp%3B%20My%20understanding%20is%20that%20scripts%20can%20run%20every%20time%20you%20launch%20and%20close%20your%20app%20(if%20you%20also%20added%20a%20script%20to%20run%20when%20you%20close%20the%20app).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOf%20course%2C%20from%20your%20script%2C%20you%20can%20define%20a%20check%2C%20to%20see%20if%20the%20script%20has%20run%20before%2C%20i.e.%20to%20check%20if%20the%20resource%20modified%20by%20the%20script%20is%20already%20in%20the%20state%20you%20wanted%20it%20to%20be%2C%20and%20in%20this%20case%20exit%20the%20script%20and%20continue%20with%20launching%20the%20application.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBogdan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1764421%22%20slang%3D%22en-US%22%3ERe%3A%20PS%20execution%20strategy%20with%20MSIX%20updates%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1764421%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F147865%22%20target%3D%22_blank%22%3E%40Bogdan%20Mitrache%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%20maybe%20my%20question%20is%20not%20enough%20clear%20%3A%3C%2FP%3E%3CP%3EI%20would%20like%20to%20know%20the%20expected%20behavior%20of%20MSIX%20in%20case%20of%20any%20%3CSTRONG%3Eupdate%3C%2FSTRONG%3E(s)%20coming%20from%20the%20Store%2C%20at%20PS%20script%20execution%20and%20supposing%20that%20this%20PS%20script%20is%20tuned%20with%20only%20one%20execution%20at%201st%20installation.%3C%2FP%3E%3CP%3EI%20would%20like%20to%20avoid%20it%20because%20asking%20elevating%20privilege%20(UAC)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERgds%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1811795%22%20slang%3D%22en-US%22%3ERe%3A%20PS%20execution%20strategy%20with%20MSIX%20updates%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1811795%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F814739%22%20target%3D%22_blank%22%3E%40JF_BAUDE%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20does%20not%20matter%20from%20where%20you%20install%20the%20app%2C%20if%20you%20set%20the%20RunOnce%20policy%2C%20it%20should%20not%20run%20it%20during%20an%20upgrade.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBy%20the%20way%2C%20I%20haven't%20tried%20publishing%20an%20MSIX%20that%20uses%20PSF%20(scripts)%20in%20the%20store.%20You%20might%20get%20a%20rejection%20from%20Microsoft.%20From%20what%20I%20remember%2C%20when%20PSF%20was%20released%20its%20purpose%20was%20to%20serve%20enterprise%20LOB%20apps%20that%20are%20no%20longer%20under%20active%20development.%26nbsp%3B%20Apps%20that%20get%20published%20in%20the%20store%20are%20usually%20under%20active%20development%20and%20in%20such%20cases%20Microsoft%20updating%20the%20code%20of%20your%20app%20to%20handle%20any%20particular%20scenarios%2C%20instead%20of%20integrating%20the%20Package%20Support%20Framework.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22psf.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F228693i53C98D179251D7CB%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22psf.png%22%20alt%3D%22psf.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi

 

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 ?

 

Rgds

JF BAUDE

4 Replies

Hi @JF_BAUDE,

 

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.

 

Bogdan

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)

 

Rgds

Hi @JF_BAUDE 

 

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.

 

psf.png

@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.