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.
8,441 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Magomed Gamadaev 0 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."
    
    0 comments No comments

  2. Quirky 0 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