how to uninstall new "Windows Backup" bloat app?


Didn't work for me! 🤷‍♂️
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS ROG Strix
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
Yeah, sorry. It worked on my test VM. But I think I need to make it a bit more robust.
I'll hopefully have a better version ready to go on Monday.
 

My Computer

System One

  • OS
    Windows 11
I honestly wonder why are people are so afraid of a cloud system backup? :think:
During System Restore, people kept making as many restore points as possible.

capture_08022024_201128.jpg
 

My Computer

System One

  • OS
    Windows 11 Home
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 8600G (07/24)
    Motherboard
    ASROCK B650M-HDV/M.2 3.18 (07/24)
    Memory
    2x32GB Kingston FURY DDR5 5600 MHz CL36 @4800 CL40 (07/24)
    Graphics Card(s)
    ASROCK Radeon RX 6600 Challenger D 8G @60FPS (08/24)
    Sound Card
    Creative Sound BlasterX AE-5 Plus (05/24)
    Monitor(s) Displays
    24" Philips 24M1N3200ZS/00 (05/24)
    Screen Resolution
    1920×1080@165Hz via DP1.4
    Hard Drives
    Kingston KC3000 NVMe 2TB (05/24)
    ADATA XPG GAMMIX S11 Pro 512GB (07/19)
    PSU
    Seasonic Core GM 550 Gold (04/24)
    Case
    Fractal Design Define 7 Mini with 3x Noctua NF-P14s/12@555rpm (04/24)
    Cooling
    Noctua NH-U12S with Noctua NF-P12 (04/24)
    Keyboard
    HP Pavilion Wired Keyboard 300 (07/24) + Rabalux 76017 Parker (01/24)
    Mouse
    Logitech M330 Silent Plus (04/23)
    Internet Speed
    500/100 Mbps via RouterOS (05/21) & TCP Optimizer
    Browser
    Edge & Brave for YouTube & LibreWolf for FB
    Antivirus
    NextDNS blocking 99% TLDs
    Other Info
    Backup: Hasleo Backup Suite (PreOS)
    Headphones: Sennheiser RS170 (09/10)
    Phone: Samsung Galaxy Xcover 7 (02/24)
    Chair: Huzaro Force 4.4 Grey Mesh (05/24)
    Notifier: Xiaomi Mi Band 9 Milanese (10/24)
    2nd Monitor: AOC G2460VQ6 @75Hz (02/19)
I'm more coming at this from just tidying up the all apps area of the start menu.
The clients I'm building are quite locked down and don't have Internet access so those 3 things on the start menu just don't work.
 

My Computer

System One

  • OS
    Windows 11
I'll hopefully have a better version ready to go on Monday...
... I'm more coming at this from just tidying up the all apps area of the start menu.
Don't rush on my account, I have a tidy Start Menu.
I honestly wonder why are people are so afraid of a cloud system backup? :think:
I'm not afraid of it, I just don't use it, so, I don't need the link in the Start Menu.
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS ROG Strix
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
I honestly wonder why are people are so afraid of a cloud system backup? :think:
During System Restore, people kept making as many restore points as possible.

View attachment 102908

I’m more confused why having something one never uses, in the start menu, is a problem? Perhaps OCD, which is fine.
But then, in your mind, you know it’s still there on your PC, I wonder if that will be a niggling after fact?
 
Last edited:

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.4974
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 - 2 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
That’s right, whether you remove the entry or not.

I don't begrudge someone wanting to remove it from sight. I didn’t even know it was there until this thread. I don’t ever use Windows Start Menu.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.4974
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 - 2 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS ROG Strix
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
Remember how we always used to create the nameless folder Toolbar to center our pinned Icons...

0007281.jpg

... then MS jumped all over that..., and ruined it!!!

0007282.jpg
 

My Computers

System One System Two

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS ROG Strix
  • Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    ASUS VivoBook
Well I just had another quick look at this and I got it to work on my laptop.

I'm not sure if it was the remove package not working or how I was running it. But I put back in the ugly remove AppX package function.

Anyway.. be sure to use the PowerShell that comes with Windows 11, not the one you can install after the fact. It seems the newer one has issues if installed via the store.

Run PowerShell as Administrator then type:
$szEP = Get-ExecutionPolicy -Scope CurrentUser
Set-ExecutionPolicy -Force Bypass -Scope CurrentUser
& Remove_CBSStartMenuRubbish.ps1
Set-ExecutionPolicy -Force $szEP -Scope CurrentUser

Powershell:
Function Restart-Process
{
    Param(    [Parameter(ValueFromPipelineByPropertyName)]$Name,
            [Parameter(ValueFromPipelineByPropertyName)]$Wait,
            [Parameter(ValueFromPipelineByPropertyName)]$Timeout,
            [Parameter(ValueFromPipelineByPropertyName)]$Kill,
            [Parameter(ValueFromPipelineByPropertyName)]$Start )
    Process
    {
        If ( $Kill )
        {
            $szSystem32Path = [Environment]::GetFolderPath("System")
            $szTaskKillBinary = "$szSystem32Path\taskkill.exe"
            Write-Host -ForegroundColor White "Killing the process '$Name'..."
            # Note, stopping Explorer like this will cause it to not automatically restart
            Start-Process -WindowStyle Hidden -Wait -FilePath $szTaskKillBinary -ArgumentList "/F /IM $Name"
        }
        Else
        {
            Write-Host -ForegroundColor White "Stopping the process '$Name'..."
            Stop-Process -Name $Name -Force    # Note, stopping Explorer like this will cause it to automatically restart
            Write-Host -ForegroundColor White "Waiting for the process '$Name' to stop..."
            Wait-Process -Name $Name -Timeout $Timeout
        }
        If ( $Start )
        {
            Write-Host -ForegroundColor White "Starting the process '$Name'..."
            If ( $Name -Eq "explorer.exe" )
            {
                Start-Process -WindowStyle Hidden -FilePath "cmd" -ArgumentList "/c start /wait $Name"
            }
            Else
            {
                # Wait doesn't work on explorer
                Start-Process -WindowStyle Hidden -Wait -FilePath $Name
            }
        }
        $szNameWithoutExtension = [io.path]::GetFilenameWithoutExtension( $Name )
        Write-Host -ForegroundColor White "Waiting for the process '$szNameWithoutExtension' to start..."
        $iCount = 0
        While ( ((Get-Process -Name $szNameWithoutExtension -ErrorAction SilentlyContinue).Count -Eq 0) -And ($iCount -lt $Timeout) )
        {
            Start-Sleep -Seconds 1
            $iCount++
        }
        Write-Host -ForegroundColor White "Waiting $Wait seconds..."
        Start-Sleep -Seconds $Wait
    }
}

Function Remove_NonRemovablePackage
{
    Param(     [Parameter(ValueFromPipelineByPropertyName)]$Name )
    Process
    {
        $remove_appx = $Name; $provisioned = get-appxprovisionedpackage -online; $appxpackage = get-appxpackage -allusers; $eol = @()
        $store = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore'
        $users = @('S-1-5-18'); if (test-path $store) {$users += $((dir $store -ea 0 |where {$_ -like '*S-1-5-21*'}).PSChildName)}
        foreach ($choice in $remove_appx) { if ('' -eq $choice.Trim()) {continue}
          foreach ($appx in $($provisioned |where {$_.PackageName -like "*$choice*"})) {
            $next = !1; foreach ($no in $skip) {if ($appx.PackageName -like "*$no*") {$next = !0}} ; if ($next) {continue}
            $PackageName = $appx.PackageName; $PackageFamilyName = ($appxpackage |where {$_.Name -eq $appx.DisplayName}).PackageFamilyName
            ni "$store\Deprovisioned\$PackageFamilyName" -force >''; $PackageFamilyName
            foreach ($sid in $users) {ni "$store\EndOfLife\$sid\$PackageName" -force >''} ; $eol += $PackageName
            dism /online /set-nonremovableapppolicy /packagefamily:$PackageFamilyName /nonremovable:0 >''
            remove-appxprovisionedpackage -packagename $PackageName -online -allusers >''
          }
          foreach ($appx in $($appxpackage |where {$_.PackageFullName -like "*$choice*"})) {
            $next = !1; foreach ($no in $skip) {if ($appx.PackageFullName -like "*$no*") {$next = !0}} ; if ($next) {continue}
            $PackageFullName = $appx.PackageFullName;
            ni "$store\Deprovisioned\$appx.PackageFamilyName" -force >''
            foreach ($sid in $users) {ni "$store\EndOfLife\$sid\$PackageFullName" -force >''} ; $eol += $PackageFullName
            dism /online /set-nonremovableapppolicy /packagefamily:$PackageFamilyName /nonremovable:0 >''
            remove-appxpackage -package $PackageFullName -allusers >''
          }
        }
    }
}

Function Remove_StartMenuCBSItems
{
    Param(     [Parameter(ValueFromPipelineByPropertyName)]$Reinstall = $True,
            [Parameter(ValueFromPipelineByPropertyName)]$RestartExplorer = $True )
    Process
    {
        $szCBSName = "MicrosoftWindows.Client.CBS"
        $szCBSAppName = "$($szCBSName)_cw5n1h2txyewy"
        $szWindowsPath = [Environment]::GetFolderPath( "Windows" )
        $szCBSXMLPath = "$szWindowsPath\SystemApps\$($szCBSAppName)\appxmanifest.xml"
        Write-Host -ForegroundColor White "Creating a backup of the Appx manifest file for '$szCBSAppName'..."
        $szCurrentTime = (Get-Date).ToString( "yyyy-MM-dd_HH-mm-ss" )
        $szBackFilePath = "$($szCBSXMLPath)_$($szCurrentTime).xml"
        Copy-Item -Force -Path $szCBSXMLPath -Destination "$($szCBSXMLPath)_$($szCurrentTime).xml"
        Write-Host -ForegroundColor White "Reading the Appx manifest file for '$szCBSAppName'..."
        $xmlCBS = [XML]( Get-Content $szCBSXMLPath )
        Write-Host -ForegroundColor White "Removing the Start menu item 'Get Started'..."
        $xmlCBSNodes = $xmlCBS.Package.Applications.Application | Where-Object { $_.Id -Eq "WebExperienceHost" }
        $xmlCBSNodes.VisualElements.SetAttribute( "AppListEntry", "none" )
        Write-Host -ForegroundColor White "Removing the Start menu item 'Windows Back up'..."
        $xmlCBSNodes = $xmlCBS.Package.Applications.Application | Where-Object { $_.Id -Eq "WindowsBackup" }
        $xmlCBSNodes.VisualElements.SetAttribute( "AppListEntry", "none" )
        Write-Host -ForegroundColor White "Removing the Start menu item 'Continue from Phone'..."
        $xmlCBSNodes = $xmlCBS.Package.Applications.Application | Where-Object { $_.Id -Eq "CrossDeviceResumeApp" }
        $xmlCBSNodes.VisualElements.SetAttribute( "AppListEntry", "none" )
        $szUser = "Administrators"
        Write-Host -ForegroundColor White "Setting '$szUser' to have full control of '$szCBSXMLPath'..."
        $arPath = New-Object System.Security.AccessControl.FileSystemAccessRule( $szUser, "FullControl", $([System.Security.AccessControl.InheritanceFlags]::None), "None", "Allow" )
        $aclPath = $aclOrig = Get-Acl $szCBSXMLPath
        $aclPath.SetAccessRule( $arPath )
        Set-Acl $szCBSXMLPath $aclPath
        Write-Host -ForegroundColor White "Saving the updated Appx manifest file for '$szCBSAppName'..."
        $objUTF8WithoutBOM = New-Object System.Text.UTF8Encoding( $False )
        $objUTF8WithoutBOMSW = New-Object System.IO.StreamWriter( $szCBSXMLPath, $False, $objUTF8WithoutBOM )
        $xmlCBS.Save( $objUTF8WithoutBOMSW )
        $objUTF8WithoutBOMSW.Close()
        Write-Host -ForegroundColor White "Resetting permissions on '$szCBSXMLPath'..."
        Set-Acl $szCBSXMLPath $aclOrig
        If ( $Reinstall )
        {
            Remove_NonRemovablePackage -Name $szCBSName
            Write-Host -ForegroundColor White "Installing package '$szCBSAppName'..."
            Add-AppxPackage -ForceApplicationShutdown -DisableDevelopmentMode -Register $szCBSXMLPath
        }
        If ( $RestartExplorer )
        {
            Restart-Process -Name "explorer.exe" -Wait 0 -Timeout 5 -Kill:$True -Start:$True
        }
        Write-Host -ForegroundColor White "Restoring the original AppX manifest file..."
        Move-Item -Force -Path $szBackFilePath -Destination $szCBSXMLPath
    }
}

Remove_StartMenuCBSItems
 

Attachments

My Computer

System One

  • OS
    Windows 11
Oh, if you ran the first script I posted. Restore the original appxmanifest.xml file first before running this one.
At: C:\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy
appxmanifest_[earliest date/time].xml -> appxmanifest.xml
 

My Computer

System One

  • OS
    Windows 11
I put the original appxmanifest.xml file back after reinstalling the tweaked appx package. So hopefully future CBS package updates will install OK.
You will have to re-run the script to remove the Start menu items again. Not ideal, but we're getting there!
 

My Computer

System One

  • OS
    Windows 11
OK, so some more testing and I've made if more robust. The permissions on the appxmanifest.xml file weren't being reset correctly so I fixed that.

I also tested a Windows update that installed a new version of the CBS package and it failed, so I've added another option to revert back to the original CBS package. When you revert the update installs ok.

Just call the script without parameters and it will remove the start menu items.

To revert back to the unmodified CBS package run the script with the RemoveStartMenuItems param set to $False.

Powershell:
Param(     [Parameter(ValueFromPipelineByPropertyName)]$RemoveStartMenuItems = $True,
        [Parameter(ValueFromPipelineByPropertyName)]$RestartExplorer = $True )

Function Restart-Process
{
    Param(    [Parameter(ValueFromPipelineByPropertyName)]$Name,
            [Parameter(ValueFromPipelineByPropertyName)]$Wait,
            [Parameter(ValueFromPipelineByPropertyName)]$Timeout,
            [Parameter(ValueFromPipelineByPropertyName)]$Kill,
            [Parameter(ValueFromPipelineByPropertyName)]$Start )
    Process
    {
        If ( $Kill )
        {
            $szSystem32Path = [Environment]::GetFolderPath("System")
            $szTaskKillBinary = "$szSystem32Path\taskkill.exe"
            Write-Host -ForegroundColor White "Killing the process '$Name'..."
            # Note, stopping Explorer like this will cause it to not automatically restart
            Start-Process -WindowStyle Hidden -Wait -FilePath $szTaskKillBinary -ArgumentList "/F /IM $Name"
        }
        Else
        {
            Write-Host -ForegroundColor White "Stopping the process '$Name'..."
            Stop-Process -Name $Name -Force    # Note, stopping Explorer like this will cause it to automatically restart
            Write-Host -ForegroundColor White "Waiting for the process '$Name' to stop..."
            Wait-Process -Name $Name -Timeout $Timeout
        }
        If ( $Start )
        {
            Write-Host -ForegroundColor White "Starting the process '$Name'..."
            If ( $Name -Eq "explorer.exe" )
            {
                Start-Process -WindowStyle Hidden -FilePath "cmd" -ArgumentList "/c start /wait $Name"
            }
            Else
            {
                # Wait doesn't work on explorer
                Start-Process -WindowStyle Hidden -Wait -FilePath $Name
            }
        }
        $szNameWithoutExtension = [io.path]::GetFilenameWithoutExtension( $Name )
        Write-Host -ForegroundColor White "Waiting for the process '$szNameWithoutExtension' to start..."
        $iCount = 0
        While ( ((Get-Process -Name $szNameWithoutExtension -ErrorAction SilentlyContinue).Count -Eq 0) -And ($iCount -lt $Timeout) )
        {
            Start-Sleep -Seconds 1
            $iCount++
        }
        Write-Host -ForegroundColor White "Waiting $Wait seconds..."
        Start-Sleep -Seconds $Wait
    }
}

Function Remove_NonRemovablePackage
{
    Param(     [Parameter(ValueFromPipelineByPropertyName)]$Name )
    Process
    {
        Write-Host -ForegroundColor White "Getting details for package '$Name'..."
        $objAppx = Get-AppxPackage -AllUsers -Name $Name
        If ( $objAppx.Count -Gt 1 ) { $objAppx = $objAppx[0] }
        $szStoreRegKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore"
        $aszUserSIDs = @( "S-1-5-18" )
        If ( Test-Path -Path $szStoreRegKey )
        {
            $aszUserSIDs += $((Get-ChildItem -Path $szStoreRegKey -ErrorAction SilentlyContinue | Where {$_ -Like '*S-1-5-21*'}).PSChildName)
        }
        Write-Host -ForegroundColor White "Setting package '$($objAppx.PackageFamilyName)' to Deprovisioned..."
        $objDeprovisionedRegKey = New-Item -Force -Path "$szStoreRegKey\Deprovisioned\$objAppx.PackageFamilyName"
        ForEach ( $szUserSID in $aszUserSIDs )
        {
            Write-Host -ForegroundColor White "Setting package '$($objAppx.PackageFullName)' to End-of-life for user SID '$szUserSID'..."
            $objEOLRegKey = New-Item -Force -Path "$szStoreRegKey\EndOfLife\$szUserSID\$($objAppx.PackageFullName)"
        }
        Write-Host -ForegroundColor White "Removing package '$($objAppx.PackageFullName)' for all users..."
        $objRemovedPackage = Remove-AppxPackage -AllUsers -Package $($objAppx.PackageFullName)
    }
}

Function Remove_StartMenuCBSItems
{
    Param( [Parameter(ValueFromPipelineByPropertyName)]$RestartExplorer )
    Process
    {
        $szCBSName = "MicrosoftWindows.Client.CBS"
        $szCBSAppName = "$($szCBSName)_cw5n1h2txyewy"
        $szWindowsPath = [Environment]::GetFolderPath( "Windows" )
        $szCBSXMLPath = "$szWindowsPath\SystemApps\$($szCBSAppName)\appxmanifest.xml"
        Write-Host -ForegroundColor White "Creating a backup of the Appx manifest file for '$szCBSAppName'..."
        $szCurrentTime = (Get-Date).ToString( "yyyy-MM-dd_HH-mm-ss" )
        $szBackFilePath = "$($szCBSXMLPath)_$($szCurrentTime).xml"
        Copy-Item -Force -Path $szCBSXMLPath -Destination "$($szCBSXMLPath)_$($szCurrentTime).xml"
        Write-Host -ForegroundColor White "Reading the Appx manifest file for '$szCBSAppName'..."
        $xmlCBS = [XML]( Get-Content $szCBSXMLPath )
        $xmlCBSNode = $xmlCBS.Package.Applications.Application | Where-Object { $_.Id -Eq "WebExperienceHost" }
        If ( $xmlCBSNode.VisualElements )
        {
            Write-Host -ForegroundColor White "Hiding the Start menu item 'Get Started'..."
            $xmlCBSNode.VisualElements.SetAttribute( "AppListEntry", "none" )
        }
        $xmlCBSNode = $xmlCBS.Package.Applications.Application | Where-Object { $_.Id -Eq "WindowsBackup" }
        If ( $xmlCBSNode.VisualElements )
        {
            Write-Host -ForegroundColor White "Hiding the Start menu item 'Windows Back up'..."
            $xmlCBSNode.VisualElements.SetAttribute( "AppListEntry", "none" )
        }
        $xmlCBSNode = $xmlCBS.Package.Applications.Application | Where-Object { $_.Id -Eq "CrossDeviceResumeApp" }
        If ( $xmlCBSNode.VisualElements )
        {
            Write-Host -ForegroundColor White "Hiding the Start menu item 'Continue from Phone'..."
            $xmlCBSNode.VisualElements.SetAttribute( "AppListEntry", "none" )
        }
        $szUser = "Administrators"
        $aclOrig = Get-Acl $szCBSXMLPath
        $aclPath = Get-Acl $szCBSXMLPath
        Write-Host -ForegroundColor White "Setting '$szUser' to have full control of '$szCBSXMLPath'..."
        $arPath = New-Object System.Security.AccessControl.FileSystemAccessRule( $szUser, "FullControl", $([System.Security.AccessControl.InheritanceFlags]::None), "None", "Allow" )
        $aclPath.SetAccessRule( $arPath )
        Set-Acl $szCBSXMLPath $aclPath
        Write-Host -ForegroundColor White "Saving the updated Appx manifest file for '$szCBSAppName'..."
        $objUTF8WithoutBOM = New-Object System.Text.UTF8Encoding( $False )
        $objUTF8WithoutBOMSW = New-Object System.IO.StreamWriter( $szCBSXMLPath, $False, $objUTF8WithoutBOM )
        $xmlCBS.Save( $objUTF8WithoutBOMSW )
        $objUTF8WithoutBOMSW.Close()
        Remove_NonRemovablePackage -Name $szCBSName
        Write-Host -ForegroundColor White "Installing package '$szCBSAppName'..."
        Add-AppxPackage -ForceApplicationShutdown -DisableDevelopmentMode -Register $szCBSXMLPath
        If ( $RestartExplorer ) { Restart-Process -Name "explorer.exe" -Wait 0 -Timeout 5 -Kill:$True -Start:$True }
        Write-Host -ForegroundColor White "Restoring the original AppX manifest file..."
        Move-Item -Force -Path $szBackFilePath -Destination $szCBSXMLPath
        Write-Host -ForegroundColor White "Resetting permissions on '$szCBSXMLPath'..."
        Set-Acl $szCBSXMLPath $aclOrig
    }
}

Function Restore_StartMenuCBSItems
{
    Param( [Parameter(ValueFromPipelineByPropertyName)]$RestartExplorer )
    Process
    {
        $szCBSName = "MicrosoftWindows.Client.CBS"
        $szCBSAppName = "$($szCBSName)_cw5n1h2txyewy"
        $szWindowsPath = [Environment]::GetFolderPath( "Windows" )
        $szCBSXMLPath = "$szWindowsPath\SystemApps\$($szCBSAppName)\appxmanifest.xml"
        Remove_NonRemovablePackage -Name $szCBSName
        Write-Host -ForegroundColor White "Installing package '$szCBSAppName'..."
        Add-AppxPackage -ForceApplicationShutdown -DisableDevelopmentMode -Register $szCBSXMLPath
        If ( $RestartExplorer ) { Restart-Process -Name "explorer.exe" -Wait 0 -Timeout 5 -Kill:$True -Start:$True }
    }
}

If ( $RemoveStartMenuItems )
{
    Remove_StartMenuCBSItems -RestartExplorer:$RestartExplorer
}
Else
{
    Restore_StartMenuCBSItems -RestartExplorer:$RestartExplorer
}
 

Attachments

Last edited:

My Computer

System One

  • OS
    Windows 11
OK, so some more testing and I've made if more robust. The permissions on the appxmanifest.xml file weren't being reset correctly so I fixed that.

I also tested a Windows update that installed a new version of the CBS package and it failed, so I've added another option to revert back to the original CBS package. When you revert the update installs ok.

Just call the script without parameters and it will remove the start menu items.

To revert back to the unmodified CBS package run the script with the RemoveStartMenuItems param set to $False.
LCU's are cumulative, so after Client.CBS gets updated for whatever reason -- it'll always be touched until patch support ends.

Which means every time a Monthly Update is applied, you need to repeat this process. Uninstall Client.CBS, rewrite manifest, re-install Client.CBS, revert to backup manifest so the next LCU can be installed. Is it annoying? Yes. But there isn't a better solution because of how Appx package integrity works.
 

My Computer

System One

  • OS
    Windows 7
It feels like this is probably the best 'solution' for now. I plan to leave this now as it sorts out my particular issue for my standalone clients. But I'm keen to hear if anyone finds a way to remove this stuff in a 'fire and forget' type of way.
I hope this helps pave the way for a more permanent solution.
Glad I could contribute a bit to the quest for less rubbish in the Start menu!! 🤣
 

My Computer

System One

  • OS
    Windows 11
After doing two days of testing, I found there's a race condition that can happen between the unregistering and re-install. Sometimes you end up with no apparent changes.

If you insert a short delay between commands, then the script never fails.
Code:
Remove-AppxPackage -AllUsers -Package $PackageFullName -Verbose
Start-Sleep 1

Add-AppxPackage -ForceApplicationShutdown -DisableDevelopmentMode -Register $ManifestFile
Start-Sleep 1

taskkill /f /im explorer.exe 2>&1 | Out-Null
Start-Process explorer
 

My Computer

System One

  • OS
    Windows 7
After doing two days of testing, I found there's a race condition that can happen between the unregistering and re-install. Sometimes you end up with no apparent changes.

If you insert a short delay between commands, then the script never fails.
Code:
Remove-AppxPackage -AllUsers -Package $PackageFullName -Verbose
Start-Sleep 1

Add-AppxPackage -ForceApplicationShutdown -DisableDevelopmentMode -Register $ManifestFile
Start-Sleep 1

taskkill /f /im explorer.exe 2>&1 | Out-Null
Start-Process explorer

So is that a batch script? As it doesn’t say at the top of your code box.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.4974
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 - 2 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
Sorry, I was providing feedback on @JamieT's script.

Basically you would drop a couple of "Start-Sleep 1" lines in between where the original script calls Remove-AppxPackage and Add-AppxPackage. Otherwise, Windows gets ahead of itself and stomps on the package re-provisioning.
 

My Computer

System One

  • OS
    Windows 7
I’d like to check out the finished compile when Jamie completes it. 🙏
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 Build 22631.4974
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz (4th Gen?)
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard
    Monitor(s) Displays
    4 x LG 23MP75 - 2 x 24MK430H-B - 1 x Wacom Pro 22" Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech G402 / G502 / Mx Masters / MX Air Cordless
    Internet Speed
    100/40Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    I’m on a horse.
  • Operating System
    Windows 11 Pro 23H2 Build: 22631.4249
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.

Latest Support Threads

Back
Top Bottom