I have a script that needs to run on multiple machines.

The problem is, if I open a command line and type in chrome or chrome.exe, I get the same error message that it is not recognized as an internal or external command...

I have already added it to my paths (as per screen shot below, see bottom entry in the paths) .

It works this way on other computers.

enter image description here

The command prompt has been restarted (as has the computer) since updating the paths.

Why does it not open Chrome as it does on my other machine(s)?

Whilst entering C:\Program Files (x86)\Google\Chrome\Application\chrome.exe directly into the command line and pressing enter does make Chrome launch, I don't see why the path is not working.

  • Did you open a new command prompt after adding it to path? – n8te Sep 14 '20 at 11:31
  • It has been like this for a while to be honest. To answer you, yes. I know that the command prompt reads the variables at start up and so any changes made after won't have any affect on the command prompt until it restarts. Thanks for checking – Dave Sep 14 '20 at 11:32
  • Generally you just add the folder path that contains the executable into path and not specifically name the executable itself. Although I tested it on my own machine with both ways and it didn't make a difference. – n8te Sep 14 '20 at 11:34
  • @n8te that's it!! I'd put the entire path in... Can you move this to an answer – Dave Sep 14 '20 at 11:38
  • Oh nice. About to leave work so don't have time to post an answer. But feel free to self answer. – n8te Sep 14 '20 at 11:38

The problem is that you had the folder path and executable listed in your path:

C:\Program Files (x86)\Google\Chrome\Application\chrome.exe 

You should omit chrome.exe and just put the folder path that chrome.exe is located in:

C:\Program Files (x86)\Google\Chrome\Application
  • 1
    I realize this is just a duplicate of the other answer, but OP was waiting on me to provide an answer based on a previous comment. – n8te Sep 15 '20 at 0:29

The entry in the PATH is invalid:

C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

It should only contain the folder, not the program:

C:\Program Files (x86)\Google\Chrome\Application
  • +1, but I don't feel I can mark as such due to the comments (waiting for @n8te to post the answer) – Dave Sep 14 '20 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.