Nikasv
Nikasv

Reputation: 1397

Opening .html file with powershell using non-default browser

I am trying to open .html file with the help of powershell. I am using Yeoman and opening it with the command "Grunt Server" but it keeps opening it in default browser. Which command should I use to open it (for example) with Chrome?

I could change my default browser to Chrome but it is just interesting to know.

Upvotes: 2

Views: 18414

Answers (2)

christianbueno.1
christianbueno.1

Reputation: 592

hello pals if you want to open a index.html file by firefox, run on power-shell.

> c:\path/to/firefox.exe index.html

example in my case

> 'c:\Program Files\Mozilla Firefox\firefox.exe' .\index.html

Upvotes: 1

avenet
avenet

Reputation: 3043

You should try running start chrome <your_filename_path> from the command line.

Also if you know the Chrome path try opening via (for example):

C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" <your_filename_path>

Upvotes: 5

Related Questions