How to add store after removal with Remove-AppxProvisionedPackage?

Discussion in 'Windows 10' started by sebus, May 16, 2018.

  1. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
    #1 sebus, May 16, 2018
    Last edited: May 16, 2018
    Once removed with Remove-AppxProvisionedPackage there seems to be no way to add it with Add-AppxProvisionedPackage

    Ofcourse I can add it per user basis:

    Code:
    Add-AppxPackage -DisableDevelopmentMode -Register "C:\Program Files\WindowsApps\Microsoft.WindowsStore_11804.1001.8.0_x64__8wekyb3d8bbwe\AppxManifest.XML"
    but I need it to be pre-provisioned for all users

    sebus
     
  2. try this in powershell to restore all apps
    Code:
    Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    and after that, use ccleaner to uninstall apps which you dont need.
     
  3. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
    That is definitely NOT what I want.
    As already stated, I can do the command & that adds the Store PER USER
    It does NOT re-provision it!
     
  4. afaik the code which i posted add apps to all the user accounts + all new future accounts.
    have you tried it?
     
  5. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
    I have, once Remove-AppxProvisionedPackage,
    Get-AppXPackage does NOT add anything to new user accounts!
    It does add to the user you are running it under!
     
  6. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
    #6 sebus, May 16, 2018
    Last edited: May 16, 2018
    (OP)
    I can get Microsoft.WindowsStore_8wekyb3d8bbwe.appxbundle from SW_DVD9_NTRL_Win_10_1803_32_64_ARM64_MultiLang_-2_App_Update_X21-79791.ISO
    but it errors out during install!

    Code:
    PS C:\temp> Add-AppxProvisionedPackage -Online -PackagePath C:\temp\Microsoft.WindowsStore_8wekyb3d8bbwe.appxbundle -LicensePath C:\temp\Microsoft.WindowsStore_8wekyb3d8bbwe.xml
    Add-AppxProvisionedPackage : Element not found.
    At line:1 char:1
    + Add-AppxProvisionedPackage -Online -PackagePath C:\temp\Microsoft.Win ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Add-AppxProvisionedPackage], COMException
        + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddAppxProvisionedPackageCommand
     
  7. i tried that on 1709 once and it worked.
    and the code Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    worked and all apps were restored on all the user accounts.
     
  8. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
  9. petok

    petok MDL Senior Member

    May 4, 2009
    340
    187
    10
    if you have removed Microsoft.DesktopAppInstaller app first install then install store.
     
  10. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
    Makes no difference

    Code:
    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    PS C:\Windows\system32> Add-AppxProvisionedPackage -Online -PackagePath c:\temp\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle -LicensePath c:\temp\Microsoft.DesktopAppInstaller_8wekyb3d8bb
    we.xml
    
    
    Path          :
    Online        : True
    RestartNeeded : False
    
    
    
    PS C:\Windows\system32> Add-AppxProvisionedPackage -Online -PackagePath c:\temp\Microsoft.WindowsStore_8wekyb3d8bbwe.appxbundle -DependencyPackagePath c:\temp\Microsoft.VCLibs.x64.14.00.appx,c:\tem
    p\Microsoft.VCLibs.x86.14.00.appx -LicensePath c:\temp\Microsoft.WindowsStore_8wekyb3d8bbwe.xml
    Add-AppxProvisionedPackage : Element not found.
    At line:1 char:1
    + Add-AppxProvisionedPackage -Online -PackagePath c:\temp\Microsoft.Win ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Add-AppxProvisionedPackage], COMException
        + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddAppxProvisionedPackageCommand
     
  11. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,205
    978
    90
    Download the cab from uup
     
  12. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
    #12 sebus, May 17, 2018
    Last edited: May 17, 2018
    (OP)
    And which cab would that be?
     
  13. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,205
    978
    90
    Modern apps
     
  14. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
    #14 sebus, May 17, 2018
    Last edited: May 17, 2018
    (OP)
    Modern Apps is esd not cab!
    Anyway, they are not .appxbundle (which I already have anyway!)
     
  15. endbase

    endbase MDL Guru

    Aug 12, 2012
    4,673
    1,710
    150
    Whys don't you use add store script posted on LTSB thread ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. xinso

    xinso MDL Guru

    Mar 5, 2009
    12,687
    13,688
    340
    The Start suggests that all Provisioned Apps have been removed...

    Yeah, I agree with endbase.
     
  17. endbase

    endbase MDL Guru

    Aug 12, 2012
    4,673
    1,710
    150
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. xinso

    xinso MDL Guru

    Mar 5, 2009
    12,687
    13,688
    340
    #18 xinso, May 17, 2018
    Last edited: May 17, 2018
    SW_DVD9_NTRL_Win_10_1803_32_64_ARM64_MultiLang_-2_App_Update_X21-79791.ISO

    x64

    Applications
    Microsoft.DesktopAppInstaller
    Microsoft.StorePurchaseApp
    Microsoft.WindowsStore

    Microsoft.Xbox.TCUI (?)
    Microsoft.XboxIdentityProvider (?)

    Frameworks
    Microsoft.NET.Native.Framework.1.6_1.6.24903.0_x64__8wekyb3d8bbwe
    Microsoft.NET.Native.Framework.1.6_1.6.24903.0_x86__8wekyb3d8bbwe
    Microsoft.NET.Native.Framework.1.7_1.7.25531.0_x64__8wekyb3d8bbwe
    Microsoft.NET.Native.Framework.1.7_1.7.25531.0_x86__8wekyb3d8bbwe

    Microsoft.NET.Native.Runtime.1.6_1.6.24903.0_x64__8wekyb3d8bbwe
    Microsoft.NET.Native.Runtime.1.6_1.6.24903.0_x86__8wekyb3d8bbwe
    Microsoft.NET.Native.Runtime.1.7_1.7.25531.0_x64__8wekyb3d8bbwe
    Microsoft.NET.Native.Runtime.1.7_1.7.25531.0_x86__8wekyb3d8bbwe

    Microsoft.VCLibs.140.00_14.0.25426.0_x64__8wekyb3d8bbwe
    Microsoft.VCLibs.140.00_14.0.25426.0_x86__8wekyb3d8bbwe

    Microsoft.Advertising.Xaml_10.1705.4.0_x64__8wekyb3d8bbwe (?)
    Microsoft.Advertising.Xaml_10.1705.4.0_x86__8wekyb3d8bbwe (?)

    Microsoft.Services.Store.Engagement_10.0.1610.0_x64__8wekyb3d8bbwe (?)
    Microsoft.Services.Store.Engagement_10.0.1610.0_x86__8wekyb3d8bbwe (?)

    Packages
    Microsoft-Windows-Store-Client-Package~31bf3856ad364e35~amd64~~10.0.17134.1.cab
    Microsoft-Windows-Store-Client-Package~31bf3856ad364e35~amd64~xx-XX~10.0.17134.1.cab
     
  19. ch100

    ch100 MDL Addicted

    Sep 11, 2016
    829
    694
    30
    You actually don't understand the difference between a Provisioned package and a per-user package.
    Sebus knows what is asking and is not what you keep saying here.
    And you keep saying the same thing that a large number of sites get it wrong, that the -AllUsers switch writes to all users. It only reads from all users, this is why it applies to Get...
     
  20. ch100

    ch100 MDL Addicted

    Sep 11, 2016
    829
    694
    30

    Do you have the pre-requisite frameworks which I believe are:

    Microsoft.NET.Native.Framework.1.6_1.6.24903.0_x64__8wekyb3d8bbwe
    Microsoft.NET.Native.Framework.1.6_1.6.24903.0_x86__8wekyb3d8bbwe
    Microsoft.NET.Native.Runtime.1.6_1.6.24903.0_x64__8wekyb3d8bbwe
    Microsoft.NET.Native.Runtime.1.6_1.6.24903.0_x86__8wekyb3d8bbwe
    Microsoft.VCLibs.140.00_14.0.25426.0_x64__8wekyb3d8bbwe
    Microsoft.VCLibs.140.00_14.0.25426.0_x86__8wekyb3d8bbwe