SimonCropp / WinDebloat

A dotnet tool that removes the bloat in Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error. Command line: winget uninstall --name "Windows Camera"

aherrick opened this issue · comments

2023-09-04 05:23:05.030 -07:00 [INF] Uninstall: 3D Viewer
2023-09-04 05:23:05.098 -07:00 [INF] Skipped uninstall of 3D Viewer since not installed
2023-09-04 05:23:05.101 -07:00 [INF] Registry: Enabled
2023-09-04 05:23:05.103 -07:00 [INF] HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo\Enabled to 0
2023-09-04 05:23:05.106 -07:00 [INF] Skipped registry entry HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo\Enabled since value already correct
2023-09-04 05:23:05.108 -07:00 [INF] Skipping 'Calculator' since it is not included by default an has not been explicitly included
2023-09-04 05:23:05.114 -07:00 [INF] Uninstall: Windows Camera
2023-09-04 05:23:05.405 -07:00 [FTL] Failed invoking command
System.Exception: Error. Command line: winget uninstall --name "Windows Camera" --disable-interactivity --exact --silent --accept-source-agreements.
ExitCode: -1978335230
Output: Windows Package Manager v1.2.10691
Copyright (c) Microsoft Corporation. All rights reserved.
Argument name was not recognized for the current command : '--disable-interactivity'
Uninstalls the selected package, either found by searching the installed packages list or directly from a manifest. By default, the query must case-insensitively match the id, name, or moniker of the package. Other fields can be used by passing their appropriate option.
usage: winget uninstall [[-q] ] []
The following arguments are available:
-q,--query The query used to search for a package
The following options are available:
-m,--manifest The path to the manifest of the package
--id Filter results by id
--name Filter results by name
--moniker Filter results by moniker
-v,--version Use the specified version; default is the latest version
-s,--source Find package using the specified source
-e,--exact Find package using exact match
-i,--interactive Request interactive installation; user input may be needed
-h,--silent Request silent installation
-o,--log Log location (if supported)
--header Optional Windows-Package-Manager REST source HTTP header
--accept-source-agreements Accept all source agreements during source operations
More help can be found at: https://aka.ms/winget-command-uninstall
Error:
at WinGet.Throw(String arguments, RunResult result) in C:\projects\windebloat\src\WinDebloat\WinGet.cs:line 88
at WinGet.Uninstall(String name) in C:\projects\windebloat\src\WinDebloat\WinGet.cs:line 51
at Program.HandleUninstall(UninstallJob job) in C:\projects\windebloat\src\WinDebloat\Program.cs:line 162
at Program.HandleJob(IJob job) in C:\projects\windebloat\src\WinDebloat\Program.cs:line 116
at Program.Inner(String[] excludes, String[] includes) in C:\projects\windebloat\src\WinDebloat\Program.cs:line 62
at Program.<>c.<

b__0_0>d.MoveNext() in C:\projects\windebloat\src\WinDebloat\Program.cs:line 13
--- End of stack trace from previous location ---
at ArgumentParser.<>c__DisplayClass0_0.<b__5>d.MoveNext() in C:\projects\windebloat\src\WinDebloat\Cli\ArgumentParser.cs:line 57
2023-09-04 05:23:05.471 -07:00 [INF] Time: 9463ms
2023-09-04 06:17:07.171 -07:00 [INF] Uninstall: 3D Viewer
2023-09-04 06:17:07.219 -07:00 [INF] Skipped uninstall of 3D Viewer since not installed
2023-09-04 06:17:07.225 -07:00 [INF] Registry: Enabled
2023-09-04 06:17:07.227 -07:00 [INF] HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo\Enabled to 0
2023-09-04 06:17:07.230 -07:00 [INF] Skipped registry entry HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo\Enabled since value already correct
2023-09-04 06:17:07.232 -07:00 [INF] Skipping 'Calculator' since it is not included by default an has not been explicitly included
2023-09-04 06:17:07.233 -07:00 [INF] Uninstall: Windows Camera
2023-09-04 06:17:07.475 -07:00 [FTL] Failed invoking command
System.Exception: Error. Command line: winget uninstall --name "Windows Camera" --disable-interactivity --exact --silent --accept-source-agreements.
ExitCode: -1978335230
Output: Windows Package Manager v1.2.10691
Copyright (c) Microsoft Corporation. All rights reserved.
Argument name was not recognized for the current command : '--disable-interactivity'
Uninstalls the selected package, either found by searching the installed packages list or directly from a manifest. By default, the query must case-insensitively match the id, name, or moniker of the package. Other fields can be used by passing their appropriate option.
usage: winget uninstall [[-q] ] []
The following arguments are available:
-q,--query The query used to search for a package
The following options are available:
-m,--manifest The path to the manifest of the package
--id Filter results by id
--name Filter results by name
--moniker Filter results by moniker
-v,--version Use the specified version; default is the latest version
-s,--source Find package using the specified source
-e,--exact Find package using exact match
-i,--interactive Request interactive installation; user input may be needed
-h,--silent Request silent installation
-o,--log Log location (if supported)
--header Optional Windows-Package-Manager REST source HTTP header
--accept-source-agreements Accept all source agreements during source operations
More help can be found at: https://aka.ms/winget-command-uninstall
Error:
at WinGet.Throw(String arguments, RunResult result) in C:\projects\windebloat\src\WinDebloat\WinGet.cs:line 88
at WinGet.Uninstall(String name) in C:\projects\windebloat\src\WinDebloat\WinGet.cs:line 51
at Program.HandleUninstall(UninstallJob job) in C:\projects\windebloat\src\WinDebloat\Program.cs:line 162
at Program.HandleJob(IJob job) in C:\projects\windebloat\src\WinDebloat\Program.cs:line 116
at Program.Inner(String[] excludes, String[] includes) in C:\projects\windebloat\src\WinDebloat\Program.cs:line 62
at Program.<>c.<b__0_0>d.MoveNext() in C:\projects\windebloat\src\WinDebloat\Program.cs:line 13
--- End of stack trace from previous location ---
at ArgumentParser.<>c__DisplayClass0_0.<b__5>d.MoveNext() in C:\projects\windebloat\src\WinDebloat\Cli\ArgumentParser.cs:line 57
2023-09-04 06:17:07.573 -07:00 [INF] Time: 6512ms

as an update they all seem to fail with this parm --disable-interactivity is there a way to work around it?

what version of winget do u have?

@SimonCropp looks like 1.2.10691 - its whatever came with this version of windows 11 i haven't updated anything other than generic windows updates - is there a prereq to force update of winget to a newer version?

yeah it turns out i rely on some features in newer versions. i have deployed a new version of WinDebloat that checks the version of winget and prompts people to update

after updating "App Installer" from the Windows Store it worked great. thanks!