Issue with Sysprepping new Windows 11 image due to Microsoft Ink

TreyFarris 30 Reputation points
2024-04-28T01:04:32.7066667+00:00

I'm trying to Sysprep a new Windows 11 Image but I keep encountering an error related to Microsoft Ink. Specifically, the error message states that package 'Microsoft.Ink.Handwriting.Main.en-US.1.0.1_0.237.110.0_x64__8wekyb3d8bbwe' was installed for a user but not provisioned for all users, and that this package will not function properly in the sysprep image. Additionally, I'm unable to remove or install Microsoft Ink for all users, as the option to uninstall is greyed out in "Add/Remove Programs", even as an administrator. I've tried using PowerShell to remove it but I keep getting an error message about other processes using it. Can someone suggest a solution please?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,522 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Quirky 55 Reputation points
    2024-05-14T21:06:03.4033333+00:00

    Two simple commands in powershell worked for me
    $MSmain = Get-AppxPackage Microsoft.Ink.Handwriting.Main.en-US

    $MSmain | Remove-AppxPackage

    Need to have * * around the app name, for some reason its not displaying when pasting in the thread

    10 people found this answer helpful.

  2. Patrick Brodeur 32 Reputation points
    2024-08-06T02:47:46.5+00:00

    I got the same issue, but with a confusing variation: I had to uninstall the package from "alluser" and from the profile that I was using. I don't know yet why this happened that way, but it worked. I fist found the package with and without the "-alluser" with Get-AppxPackage command, and piped it to Remove-AppxPackage. Note that if you do a "Get-AppxPackage -alluser" and pipe it to "Remove-AppxPackage", you must add the "-AllUsers" parameters to the Remove-AppxPackage, otherwise the Remove-AppxPackage won't find the package to remove.

    Get-AppxPackage | Where PublisherId -eq 8wekyb3d8bbwe | Where-Object {$_.PackageFullName -like "Microsoft.Ink.Handwriting.Main.fr*"} | Remove-AppxPackage

    Get-AppxPackage -alluser | Where PublisherId -eq 8wekyb3d8bbwe | Where-Object {$_.PackageFullName -like "Microsoft.Ink.Handwriting.Main.fr*"} | Remove-AppxPackage -AllUsers

    I hope this help somebody!

    6 people found this answer helpful.

  3. Magomed Gamadaev 20 Reputation points
    2024-05-13T09:31:28.65+00:00

    I found a solution, replace all you app removing scripts by this one:

    Import-Module Appx
    Import-Module Dism
    
    # Get all packages  Where PublisherId -eq 8wekyb3d8bbwe and remove them
    Get-AppxPackage -AllUsers | Where PublisherId -eq 8wekyb3d8bbwe | Remove-AppxPackage
    
    # Get all packages from DISM
    $packages = dism /online /get-packages
    
    # Filter packages containing 'handwriting'
    $targetPackages = $packages -split "`r`n" | Where-Object { $_ -like "*handwriting*" }
    
    # Extract package names
    $packageNames = $targetPackages | ForEach-Object {
        if ($_ -match "Package Identity : (?<name>.*)") {
            $Matches.name.trim()
        }
    }
    
    # Remove each identified package
    foreach ($pkg in $packageNames) {
        if ($pkg) {
            Write-Host "Removing package: $pkg"
            dism /online /remove-package /packagename:$pkg /NoRestart
        }
    }
    
    Write-Host "Done removing packages."
    
    4 people found this answer helpful.
    0 comments No comments

  4. Penske9899 10 Reputation points
    2024-06-04T15:19:18.3133333+00:00

    I used this article to help me solve this issue. I went to System Properties (Settings>System>About under Device Specifications>Advanced system settings - User Profiles>Settings. I deleted all profiles except for Administrator and default. Ran sysprep again and it worked. The app was provisioned for another profile I used to setup the computer.

    https://learn.microsoft.com/en-us/troubleshoot/windows-client/installing-updates-features-roles/sysprep-fails-remove-or-update-store-apps

    Hope this helps.

    2 people found this answer helpful.

  5. John 5 Reputation points
    2025-02-03T05:16:52.5333333+00:00

    When I try to use this in PowerShell, I get the following error:

    PS C:\Users\jtm_7> Get-AppxPackage -alluser | Where PublisherId -eq 8wekyb3d8bbwe | Where-Object {$_.PackageFullName -like "Microsoft.Ink.Handwriting.Main.*1.0.1_0.645.1237.0_x64__8wekyb3d8bbwe *"} | Remove-AppxPackage -AllUsers

    Get-AppxPackage : Access is denied.

    Access is denied.

    At line:1 char:1

    • Get-AppxPackage -alluser | Where PublisherId -eq 8wekyb3d8bbwe | Wher ...
    • 
          + CategoryInfo          : NotSpecified: (:) [Get-AppxPackage], UnauthorizedAccessException
      
          + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.Windows.Appx.PackageManager.Commands.GetApp
      
         xPackageCommand
      
      

    John

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.