Skip to content

Windows 11 RemoveApps.ps1 script is checking for the wrong file #1

Description

@Pedromanuelsilva

I believe there is an error on line 8 of your RemoveApps.ps1 script on the Windows 11 removeapp zip folder. It's checking for the apps$($Buildnr).txt file and opening the Capabilities$($Buildnr).txt that may not exist and throw an exception

Currently its:

# If a capabilities file exist with a matching buildnumber it will remove the capabilities in it.
$FileExists = Test-Path "$($PSScriptRoot)\apps$($Buildnr).txt"
If ($FileExists) {
    $Capabilities = Get-Content "$($PSScriptRoot)\Capabilities$($Buildnr).txt"

should be

# If a capabilities file exist with a matching buildnumber it will remove the capabilities in it.
$FileExists = Test-Path "$($PSScriptRoot)\Capabilities$($Buildnr).txt"
If ($FileExists) {
    $Capabilities = Get-Content "$($PSScriptRoot)\Capabilities$($Buildnr).txt"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions