8000 Windows 11 RemoveApps.ps1 script is checking for the wrong file · Issue #1 · Ccmexec/MEMCM-OSD-Scripts · GitHub
[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Pedromanuelsilva opened this issue Dec 6, 2022 · 0 comments

Comments

@Pedromanuelsilva
Copy link

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"

5422
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0