Sure you can use the regular methods to do what we going to talk about in this post; but just in case you want to know how you can use the command line to open Google Chrome or Mozilla Firefox and perform related tasks, then this post will help you. The most important thing about the command prompt is that it can do almost every single task in an easy and effective way. In this guide, you will see how to open Chrome or Firefox using Command Prompt and Windows PowerShell.
Open Chrome or Firefox using Command Prompt or PowerShell
In this post, we will cover the following topics:
- Open Chrome/Firefox using Command Prompt
- Launch Chrome/Firefox as Administrator
- Open Chrome/Firefox in Incognito Mode
- Open a specific URL directly
- Open Chrome/Firefox using PowerShell.
Let us see how to do it. While we have taken the example of Chrome, you can use the same commands. Just replace chrome with firefox.
1] Open Chrome using Command Prompt
In order to launch the chrome browser using a command-line, you need to open the Command Prompt your Windows 10. Once it opens, type the following command and hit enter.
On pressing the Enter key, it will open the Google Chrome browser on your screen.
2] Open Chrome as Administrator
Using this tool, you can also launch the Chrome browser as an administrator.
Open the command prompt and type the following parameter:
runas /user:administrator “C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe
Press the Enter key to execute the command line. The system now asks you to input the admin password of your device. So, type the password and hit enter.
3] Open Chrome in Incognito Mode
In Google Chrome, you can use Incognito mode to add a layer of protection to your browsing data. It protects your information from being accessed without your permission. So, to open chrome in Incognito mode, you need to open the Command prompt and run the below command:
Start chrome /incognito
Chrome will now launch in incognito mode.
4] Go to a Specific Website directly
If you want to open any site in the Chrome browser using Command Prompt, you can do such by executing the following command. Here is the following command:
start chrome www.<websiteURL>.com.
So, if you require to go to the thewindowsclub.com directly, you would have to run the following command:
start chrome www.thewindowsclub.com
Also, you can navigate to a specific website in incognito mode by running the command given. These are:
start chrome /incognito www.thewindowsclub.com
5] Open Chrome using PowerShell Command
In order to launch the Chrome browser using PowerShell script, first, you need to open the Windows PowerShell. To do so, click on the Start button and type PowerShell. From the top of the result, select Windows PowerShell.
Once it opens, type the following commands and hit enter to launch Google Chrome.
Start-Process -FilePath 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
For Firefox, you have to use the path of your installation folder. So the command woul be:
Start-Process -FilePath 'C:\Program Files\Mozilla Firefox\firefox.exe'
That’s it. I hope you may find this guide helpful.