Penguin
Penguin

Reputation: 71

'flutter' is not recognized in windows cmd prompt with elevated permissions

Flutter path is correct but still unable to be recognized by the windows command prompt. Looked everywhere asked anyone who used flutter still unable to figure out the problem.

Tried suggestions made on other questions similar to this still no luck and followed the tutorials on installing flutter did not work.

Command Prompt

Environment Variables

Upvotes: 1

Views: 5902

Answers (4)

Kenart
Kenart

Reputation: 335

For windows user make sure to include C:\Windows\System32 in your user PATH variable,this prevents the flutter command prompt from flashing when you click it.

Upvotes: 0

Lloyd Dcosta
Lloyd Dcosta

Reputation: 301

Adding the following things in the path solved the issue for me

C:\Program Files\Git\bin
C:\Program Files\Git\cmd
C:\Windows\System32
C:\Windows\SysWOW64\WindowsPowerShell\v1.0
C:\src\flutter\bin

Upvotes: 0

Amjad Alwareh
Amjad Alwareh

Reputation: 3261

For Windows users (Windows 10)

  1. Open Start menu and type env
  2. Click on Environment Variables..
  3. under User variables, select Path then click Edit
  4. Click New then past this line C:\src\flutter\bin(supposing this is where 'bin' directory of Flutter is located on your machine)
  5. Click 'OK'.

Restart is required to apply changes.

Upvotes: 6

rmtmckenzie
rmtmckenzie

Reputation: 40433

The command prompt you're using appears to be using elevated permissions and therefore will have the "system" environment variables but not your user ones necessarily. Try with a non-elevated command prompt... which you should be using anyways. Only use an elevated command prompt when absolutely needed as otherwise you could delete important things by accident. Also, you can run echo %PATH% to see what is actually in the path in the command prompt you're using.

If you want to use flutter across multiple users or need to use an elevated command prompt for some reason, add the path to flutter/bin to the system environment variables instead.

Upvotes: 2

Related Questions