LoginSignup
4
4

More than 1 year has passed since last update.

wingetが使えなくなったとき

Posted at

概要

windows10環境下にインストール済み、利用実績ありのwingetですが、
ある日、powershellを管理者権限で起動してwingetコマンドを叩いても、
そんなコマンドはないと言われるようになっていた。
表示されるメッセージ:「wingetは(略)認識されません」

原因

最近の出来事で思い当たったのが、
先日誤ってユーザ環境変数PATHを飛ばしてしまったことです。
このときwinget動作に必要なPATH情報が失われたのかもしれません。

対応

wingetの再インストールや再起動をしても改善しませんでした。
ユーザ環境変数PATHを直接編集してみます。
以下をユーザ環境変数PATHに追加します。※追加です※

C:\Users\USERNAME\AppData\Local\Microsoft\WindowsApps
  • USERNAMEはそれぞれのユーザ名です。
  • 上記パスはwingetをwindows上で検索して特定しました。

結果

その後powershellを再立ち上げしたら無事wingetが動きました!

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4