Home

ForceApplicationShutdown and ForceTargetApplicationShutdown

%3CLINGO-SUB%20id%3D%22lingo-sub-662895%22%20slang%3D%22en-US%22%3EForceApplicationShutdown%20and%20ForceTargetApplicationShutdown%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-662895%22%20slang%3D%22en-US%22%3E%3CP%3E1)%20If%20an%20application%20is%20in%20use%20when%20an%20upgrade%20is%20attempted%2C%20will%20the%20Add-AppXPackage%20complete%20or%20fail%3F%26nbsp%3B%20If%20so%20is%20there%20any%20thought%20of%20adding%20the%20command%20to%20a%20pending%20queue%20to%20be%20processed%20at%20a%20later%20time%20(such%20as%20is%20done%20in%20App-V)%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E2)%20When%20upgrading%20an%20MSIX%20package%2C%20what%20is%20the%20difference%20between%20the%20switches%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20-ForceApplicationShutdown%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20-ForceTargetApplicationShutdown%3C%2FP%3E%0A%3CP%3EIn%20particular%2C%20are%20there%20situations%20where%20one%20might%20fail%20and%20the%20other%20succeed%3F%26nbsp%3B%20I'm%20guessing%20that%20if%20you%20specify%20only%20the%20target%20application%20it%20is%20possible%20the%20Add%20might%20not%20be%20able%20to%20complete%20successfully%20in%20some%20cases.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-665814%22%20slang%3D%22en-US%22%3ERe%3A%20ForceApplicationShutdown%20and%20ForceTargetApplicationShutdown%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-665814%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F146612%22%20target%3D%22_blank%22%3E%40TIMOTHY%20MANGAN%3C%2FA%3E%26nbsp%3Bwrote%3A%3CBR%20%2F%3E%3CP%3E1)%20If%20an%20application%20is%20in%20use%20when%20an%20upgrade%20is%20attempted%2C%20will%20the%20Add-AppXPackage%20complete%20or%20fail%3F%26nbsp%3B%20If%20so%20is%20there%20any%20thought%20of%20adding%20the%20command%20to%20a%20pending%20queue%20to%20be%20processed%20at%20a%20later%20time%20(such%20as%20is%20done%20in%20App-V)%3F%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E%5BJV%5D%20The%20api%20surface%20allows%20a%20deferred%20registration%20of%20the%20package%2C%20so%20it%20updates%20on%20the%20next%20launch.%26nbsp%3B%20We%20working%20to%20expose%20that%20to%20the%20PowerShell%20cmdlets%20and%20the%20CSP%20that%20management%20tools%20use.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E2)%20When%20upgrading%20an%20MSIX%20package%2C%20what%20is%20the%20difference%20between%20the%20switches%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20-ForceApplicationShutdown%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20-ForceTargetApplicationShutdown%3C%2FP%3E%0A%3CP%3EIn%20particular%2C%20are%20there%20situations%20where%20one%20might%20fail%20and%20the%20other%20succeed%3F%26nbsp%3B%20I'm%20guessing%20that%20if%20you%20specify%20only%20the%20target%20application%20it%20is%20possible%20the%20Add%20might%20not%20be%20able%20to%20complete%20successfully%20in%20some%20cases.%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E%5BJV%5D%20The%20difference%20is%20around%20framework%20packages%20and%20how%20we%20handle%20the%20shutdown%20of%20the%20related%20frameworks.%20For%20the%20most%20part%20you%20should%20rely%20on%20ForceTargetApplicationShutdown.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F146612%22%20target%3D%22_blank%22%3E%40TIMOTHY%20MANGAN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
TIMOTHY MANGAN
MVP

1) If an application is in use when an upgrade is attempted, will the Add-AppXPackage complete or fail?  If so is there any thought of adding the command to a pending queue to be processed at a later time (such as is done in App-V)?

 

2) When upgrading an MSIX package, what is the difference between the switches:

    -ForceApplicationShutdown 

    -ForceTargetApplicationShutdown

In particular, are there situations where one might fail and the other succeed?  I'm guessing that if you specify only the target application it is possible the Add might not be able to complete successfully in some cases.

 

 

1 Reply

 


@TIMOTHY MANGAN wrote:

1) If an application is in use when an upgrade is attempted, will the Add-AppXPackage complete or fail?  If so is there any thought of adding the command to a pending queue to be processed at a later time (such as is done in App-V)?

[JV] The api surface allows a deferred registration of the package, so it updates on the next launch.  We working to expose that to the PowerShell cmdlets and the CSP that management tools use.

 

2) When upgrading an MSIX package, what is the difference between the switches:

    -ForceApplicationShutdown 

    -ForceTargetApplicationShutdown

In particular, are there situations where one might fail and the other succeed?  I'm guessing that if you specify only the target application it is possible the Add might not be able to complete successfully in some cases.

[JV] The difference is around framework packages and how we handle the shutdown of the related frameworks. For the most part you should rely on ForceTargetApplicationShutdown.

 


@TIMOTHY MANGAN 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies