LogoLogo
OSDeploy.comTwitterPowerShell GalleryGitHub
  • Overview
  • OSDeploy Home
  • Module
    • Release Information
      • 2019-01
      • 2018-12
      • 2018-11
      • 2018-10
      • 2018-09
      • 2018-08
      • 2018-07
    • Functions
      • Main
        • Get-OSBuilder
          • Set Path
      • Maintenance
        • Repair-OSBuildTask
      • OSBMedia
        • New-OSBMediaISO
        • New-OSBMediaUSB
        • Show-OSBMediaINFO
      • OSBUpdate
        • Get-OSBUpdate
        • New-OSBUpdate
      • OSMedia
        • Get-OSMedia
        • Import-OSMedia
          • Batch Import-OSMedia
        • Update-OSMedia
          • Execute
      • OSBuild
        • New-OSBuildTask
          • Remove Appx Provisioned Package
          • Remove Windows Package
          • Remove Windows Capability
          • Disable Windows Optional Feature
          • Enable Windows Optional Feature
        • New-OSBuildTask (External Content)
          • Features On Demand
          • Language Packs
          • IsoExtract Content
          • Language Interface Packs
          • Language Features On Demand
          • Local Experience Packs
          • PowerShell Scripts
            • Update-OneDriveSetup
        • New-OSBuildTask (WinPE)
          • WinPE DaRT
          • WinPE Drivers
          • WinPE PowerShell Scripts
          • WinPE Extra Files
          • WinPE ADK Packages
        • New-OSBuild
      • PEBuild
        • New-PEBuildTask
          • Recovery
          • WinPE
          • MDT
        • New-PEBuild
    • PowerShell Gallery
    • GitHub
  • Docs
    • Reviews
    • Fan Requests
    • Quick Start
    • Tips
      • Task Naming
      • Verbose Logging
      • OSMedia Archive
      • OSMedia Updating
      • OSMedia Failed UBR Change
      • Windows Setup Wallpaper
    • Articles
      • Latest Latest Cumulative Update (Latest LCU)
      • Update Catalogs
      • Windows Setup with DaRT Remote Connection
      • Offline Servicing
      • Servicing Stacks
      • Work with Languages
      • DISM Cleanup Image Pending Operations
      • Win10 1607 Appx Issues
      • Updating an Updated WIM
      • OSBuilder OS Information
      • What Should I Update?
      • Windows 10 Setup and the ei.cfg
      • Automating Windows Update Downloads
      • Solutions
    • Recycle Bin
      • Instructions
        • Detailed
          • pebuild
            • scripts
              • Set-TimeZone
            • WinPE Types
              • Recovery
              • Recovery DaRT
              • Windows PE
              • MDT
            • Auto ExtraFiles
            • Drivers
              • RegAdd ActivePowerScheme
              • RegAdd AeroLite Theme
              • RegAdd Browse
              • RegAdd PowerShell ExecutionPolicy
            • ExtraFiles
              • Wallpaper
          • Update
      • OSBuilder New-OSBTemplate
      • OSBuild Templates
    • Guides
      • OSBuild Arcade
        • Frogger
      • OSBuild Templates
      • OSBuild Registry
      • Windows 7 SP1
        • Import OSMedia
        • Download Updates
        • NVMe Hotfix
        • Update OSMedia
        • ISO Testing
      • Windows 10 1809 RSAT Capability
      • registry
        • OSBuild Registry REG
          • Certificates
        • OSBuild Registry XML
    • The Basics
      • Requirements
      • Installation
      • Support
      • Get Started
      • Update OSBuilder
      • Import an OS
      • OS Information
      • Update an OS
      • Update an OS (Process)
      • Create External Media
        • Create an ISO
        • Create a USB
      • Create an OSBuild
Powered by GitBook
On this page
  • OSBuilder Validation
  • Online Validation
  • New-OSBuildTask -TaskName "Win10 1607 x86 Appx"
  • Invoke-OSBuilderTask -ExecutionMode "Execute Stepped"
  • Execute Stepped
  • Results

Was this helpful?

  1. Docs
  2. Articles

Win10 1607 Appx Issues

PreviousDISM Cleanup Image Pending OperationsNextUpdating an Updated WIM

Last updated 5 years ago

Was this helpful?

So I came across an issue with OSBuilder, I was not able to remove Appx Packages and received an error

Remove-AppxProvisionedPackage : The system cannot find the file specified.At C:\Users\OSDeploy\Documents\WindowsPowerShell\Modules\OSBuilder\Invoke-OSBuilderTask.ps1:768 char:45+ ... st Build') {Remove-AppxProvisionedPackage -Path "$MountDirectory" -Pa ...+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : NotSpecified: (:) [Remove-AppxProvisionedPackage], COMException    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RemoveAppxProvisionedPackageCommand

OSBuilder Validation

So I need to see if it is OSBuilder that is at fault, so I mounted my Install.wim and tested the process manually

Remove-AppxProvisionedPackage : The system cannot find the file specified.At line:1 char:1+ Remove-AppxProvisionedPackage -Path $mount -PackageName Microsoft.Zun ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : NotSpecified: (:) [Remove-AppxProvisionedPackage], COMException    + FullyQualifiedErrorId : Microsoft.Dism.Commands.RemoveAppxProvisionedPackageCommand

Online Validation

I'm not the only one with this problem it seems

Apparently it is quite possible that applying the Cumulative Update causes this issue, so I need to remove my Appx BEFORE applying the Cumulative Update.

New-OSBuildTask -TaskName "Win10 1607 x86 Appx"

So I delete my OSMedia 1607 (with the CU) and go back to the original imported version. I then create a New-OSBuildTask and select Windows 10 x86 1607 only remove Appx Packages, and nothing else. When testing I choose to always start with x86 as it is smaller, so I get results quicker.

Invoke-OSBuilderTask -ExecutionMode "Execute Stepped"

I will now Invoke the Task with -ExecutionMode "Execute Stepped"

Execute Stepped

This method adds several "Press Enter to continue" stops throughout the process. This allows me to target the specific action that I am looking into. Additionally, since I am still mounted, I can perform some other testing.

Results

I guess I just confirmed that Appx Packages can't be removed Offline on Windows 10 1607. It seems that the original release was able to, but subsequent released can't.

But Remove Capability works fine!

So no removing Appx Packages from Windows 10 1607! I won't make any changes to OSBuilder to address this as you may have a version older 14393.447 that does work properly.

​​

​​

​​

https://serverfault.com/questions/814362/removing-windows-10-built-in-apps-from-a-windows-10-image
http://www.edugeek.net/forums/windows-10/165029-how-get-rid-candy-crush-soda-saga-other-windows-10-start-menu-junk-good-7.html
https://social.technet.microsoft.com/Forums/windows/en-US/83e9be65-729b-4c4d-88e4-252a4ca38a34/cannot-remove-windows-10-apps-during-task-sequence?forum=mdt