执行视频工具命令时意外安装Chocolatey包管理器的问题
Troubleshooting Unwanted Chocolatey Auto-Installation
Here are actionable steps to resolve the issue where Chocolatey keeps reinstalling despite prior uninstallation:
Remove residual Chocolatey files and registry entries
- Delete the default Chocolatey directories:
C:\ProgramData\chocolateyC:\Users\<YourUsername>\AppData\Local\Chocolatey
- Open Registry Editor (
regedit), navigate to and delete these keys if they exist:HKEY_LOCAL_MACHINE\SOFTWARE\ChocolateyHKEY_CURRENT_USER\SOFTWARE\Chocolatey
- Delete the default Chocolatey directories:
Inspect the command/script you're running
- Many tools include Chocolatey installation as part of their setup workflow. Check if the command from the video contains a Chocolatey install snippet (e.g., the official PowerShell install command). If present, modify the script to exclude this installation step.
Validate environment variables and system path
- Open Command Prompt and run these commands to check for lingering Chocolatey references:
echo %ChocolateyInstall% echo %Path% - If any Chocolatey paths are found, remove them manually via System Properties > Advanced > Environment Variables.
- Open Command Prompt and run these commands to check for lingering Chocolatey references:
Clear cached installer scripts
- Delete files in your temporary folders:
%temp%%localappdata%\Temp
- This ensures you're not running a cached version of the script that triggers Chocolatey installation.
- Delete files in your temporary folders:
Use a clean shell session
- Launch a new Command Prompt or PowerShell window as Administrator, then execute your target command again. This avoids any leftover session variables that might trigger reinstallation.
内容的提问来源于stack exchange,提问作者P.Bak
相关产品推荐
相关产品推荐

