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,384
    2,037
    210
    #21 sebus, May 17, 2018
    Last edited: May 17, 2018
    (OP)
    Thanks xinso, but dism also gives same error:

    Element not found.

    Code:
    PS C:\Windows\system32> Add-AppxProvisionedPackage -Online -PackagePath c:\temp\Microsoft.WindowsStore_8wekyb3d8bbwe.app
    xbundle -DependencyPackagePath,c:\temp\Microsoft.NET.Native.Framework.x64.1.6.appx,c:\temp\Microsoft.NET.Native.Framework.x64.1.7.appx,c:\temp
    \Microsoft.NET.Native.Framework.x86.1.6.appx,c:\temp\Microsoft.NET.Native.Framework.x86.1.7.appx,c:\temp\Microsoft.NET.N
    ative.Runtime.x64.1.6.appx,c:\temp\Microsoft.NET.Native.Runtime.x64.1.7.appx,c:\temp\Microsoft.NET.Native.Runtime.x86.1.
    6.appx,c:\temp\Microsoft.NET.Native.Runtime.x86.1.7.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
    Code:
    PS C:\temp> dism /online /Add-ProvisionedAppxPackage /PackagePath:Microsoft.WindowsStore_8wekyb3d8bbwe.appxbundle /Depen
    dencyPackagePath:Microsoft.NET.Native.Framework.x64.1.6.appx /DependencyPackagePath:Microsoft.NET.Native.Framework.x64.1
    .7.appx /DependencyPackagePath:Microsoft.NET.Native.Framework.x86.1.6.appx /DependencyPackagePath:Microsoft.NET.Native.F
    ramework.x86.1.7.appx /DependencyPackagePath:Microsoft.NET.Native.Runtime.x64.1.6.appx /DependencyPackagePath:Microsoft.
    NET.Native.Runtime.x64.1.7.appx /DependencyPackagePath:Microsoft.NET.Native.Runtime.x86.1.6.appx /DependencyPackagePath:
    Microsoft.NET.Native.Runtime.x86.1.7.appx /LicensePath:Microsoft.WindowsStore_8wekyb3d8bbwe.xml
    
    Deployment Image Servicing and Management tool
    Version: 10.0.17134.1
    
    Image Version: 10.0.17134.48
    
    
    Error: 1168
    
    Element not found.
    
    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
    sebus
     
  2. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,384
    2,037
    210
    Because that is not the version that applies to 1803!
     
  3. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,384
    2,037
    210
    #23 sebus, May 17, 2018
    Last edited: May 17, 2018
    (OP)
    In the end I done another install on another machine, copied registry branch

    Code:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Applications\Microsoft.WindowsStore_11712.1001.2313.0_neutral_~_8wekyb3d8bbwe
    and now I have it back

    Code:
    PS C:\temp> Get-AppxProvisionedPackage -Online
    
    
    DisplayName  : Microsoft.DesktopAppInstaller
    Version      : 1.8.15011.0
    Architecture : neutral
    ResourceId   : ~
    PackageName  : Microsoft.DesktopAppInstaller_1.8.15011.0_neutral_~_8wekyb3d8bbwe
    Regions      :
    
    DisplayName  : Microsoft.StorePurchaseApp
    Version      : 11712.1801.10024.0
    Architecture : neutral
    ResourceId   : ~
    PackageName  : Microsoft.StorePurchaseApp_11712.1801.10024.0_neutral_~_8wekyb3d8bbwe
    Regions      :
    
    DisplayName  : Microsoft.WindowsStore
    Version      : 11712.1001.2313.0
    Architecture : neutral
    ResourceId   : ~
    PackageName  : Microsoft.WindowsStore_11712.1001.2313.0_neutral_~_8wekyb3d8bbwe
    Regions      :
     
  4. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,774
    14,483
    340
    #24 xinso, May 17, 2018
    Last edited by a moderator: May 17, 2018
    Congrats. Check Updates.

    My 17134.1:
    Microsoft.DesktopAppInstaller_2018.402.2359.0_neutral_~_8wekyb3d8bbwe
    Microsoft.StorePurchaseApp_11805.1000.1613.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsStore_11804.1001.913.0_neutral_~_8wekyb3d8bbwe

    These are scripts I use to remove Provisioned Apps from install.wim:

    Run as Admin

    ProvisionedAppxPackage-Get.cmd
    Code:
    @echo off
    pushd "%~dp0"
    
    set MT=
    set MT=image:z:\1
    
    if exist ProvisionedAppxPackage.txt del /s /q ProvisionedAppxPackage.txt >nul 2>&1
    
    for /f "tokens=2 delims=: " %%i in ('dism /%MT% /Get-ProvisionedAppxPackages ^| find /I "PackageName"') do echo %%i >>ProvisionedAppxPackage.txt
    
    pause
    exit
    

    ProvisionedAppxPackage.txt (Delete what you want to keep)
    Code:
    Microsoft.BingWeather_4.23.10923.0_neutral_~_8wekyb3d8bbwe
    Microsoft.DesktopAppInstaller_2018.402.2359.0_neutral_~_8wekyb3d8bbwe
    Microsoft.GetHelp_10.1706.10952.0_neutral_~_8wekyb3d8bbwe
    Microsoft.Getstarted_6.10.10872.0_neutral_~_8wekyb3d8bbwe
    Microsoft.Messaging_2018.222.2231.0_neutral_~_8wekyb3d8bbwe
    Microsoft.Microsoft3DViewer_4.1804.19012.0_neutral_~_8wekyb3d8bbwe
    Microsoft.MicrosoftOfficeHub_2018.428.1013.0_neutral_~_8wekyb3d8bbwe
    Microsoft.MicrosoftSolitaireCollection_4.1.5154.0_neutral_~_8wekyb3d8bbwe
    Microsoft.MicrosoftStickyNotes_2.1.18.0_neutral_~_8wekyb3d8bbwe
    Microsoft.MSPaint_4.1805.9037.0_neutral_~_8wekyb3d8bbwe
    Microsoft.Office.OneNote_2015.9330.20531.0_neutral_~_8wekyb3d8bbwe
    Microsoft.OneConnect_4.1805.1291.0_neutral_~_8wekyb3d8bbwe
    Microsoft.People_2018.215.110.0_neutral_~_8wekyb3d8bbwe
    Microsoft.Print3D_2.0.10611.0_neutral_~_8wekyb3d8bbwe
    Microsoft.SkypeApp_12.1813.286.0_neutral_~_kzf8qxf38zg5c
    Microsoft.StorePurchaseApp_11805.1000.1613.0_neutral_~_8wekyb3d8bbwe
    Microsoft.Wallet_2.1.18009.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WebMediaExtensions_1.0.10671.0_neutral_~_8wekyb3d8bbwe
    Microsoft.Windows.Photos_2018.18041.14110.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsAlarms_2018.516.2059.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsCalculator_2018.501.612.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsCamera_2018.425.30.0_neutral_~_8wekyb3d8bbwe
    microsoft.windowscommunicationsapps_2015.9226.21615.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsFeedbackHub_2018.504.2149.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsMaps_2018.216.2133.1000_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsSoundRecorder_2018.501.614.0_neutral_~_8wekyb3d8bbwe
    Microsoft.WindowsStore_11804.1001.913.0_neutral_~_8wekyb3d8bbwe
    Microsoft.Xbox.TCUI_1.11.29001.0_neutral_~_8wekyb3d8bbwe
    Microsoft.XboxApp_39.39.21002.0_neutral_~_8wekyb3d8bbwe
    Microsoft.XboxGameOverlay_1.26.6001.0_neutral_~_8wekyb3d8bbwe
    Microsoft.XboxGamingOverlay_1.15.1001.0_neutral_~_8wekyb3d8bbwe
    Microsoft.XboxIdentityProvider_12.39.13003.1000_neutral_~_8wekyb3d8bbwe
    Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_neutral_~_8wekyb3d8bbwe
    Microsoft.ZuneMusic_2019.18041.14611.0_neutral_~_8wekyb3d8bbwe
    Microsoft.ZuneVideo_2019.18041.14611.0_neutral_~_8wekyb3d8bbwe
    

    ProvisionedAppxPackage-Remove-Some.cmd
    Code:
    @echo off
    pushd "%~dp0"
    
    set MT=
    set MT=Image:z:\1
    
    for /f %%i in ('findstr /i . ProvisionedAppxPackage.txt 2^>nul') do dism /%MT% /Remove-ProvisionedAppxPackage /Packagename:%%i
    
    pause
    exit
    

    ProvisionedAppxPackage-Remove-All.cmd
    Code:
    @echo off
    pushd "%~dp0"
    
    set MT=
    set MT=image:z:\1
    
    for /f "tokens=2 delims=: " %%i in ('dism /%MT% /Get-ProvisionedAppxPackages ^| find /I "PackageName"') do dism /%MT% /Remove-ProvisionedAppxPackage /Packagename:%%i
    
    pause
    exit
    
     
  5. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,774
    14,483
    340
    #25 xinso, May 17, 2018
    Last edited: May 17, 2018
    but that still does not make Store available for new users?

    Wait for developers. I'd like to learn too.
     
  6. petok

    petok MDL Senior Member

    May 4, 2009
    352
    202
    10
    try add region end commands here info
     
  7. ch100

    ch100 MDL Addicted

    Sep 11, 2016
    841
    704
    30
  8. xinso

    xinso MDL Guru

    Mar 5, 2009
    13,774
    14,483
    340
    Good jobs. Thank you gentlemen.
     
  9. medhat258

    medhat258 MDL Novice

    Mar 25, 2018
    13
    2
    0
    Good jobs. Thank you