looking for some help writing a batch file to use as a joke on my friend. essentially i want it to open a certain URL in chrome. then i was going to disguise it as something like svchost.exe and have it run at startup on a timer. thanks a lot!
Asked
Active
Viewed 2.4e+01k times
59
-
well i've never written batch before so I was looking for someone to help me start to finish on the actual code – user2824396 Oct 14 '13 at 02:21
-
A more interesting idea would be to change his desktop background to an image from this site, every time he logs on. – Monacraft Oct 14 '13 at 03:54
-
Tip: google `chrome command line` – LS_ᴅᴇᴠ Oct 14 '13 at 14:06
4 Answers
96
It's very simple. Just try:
start chrome https://www.google.co.in/
it will open the Google page in the Chrome browser.
If you wish to open the page in Firefox, try:
start firefox https://www.google.co.in/
Have Fun!

Pang
- 9,564
- 146
- 81
- 122

SabareeshSS
- 1,361
- 2
- 11
- 20
-
3
-
@paK0 are you trying this command from run prompt, command prompt or a batch file? – RBT Dec 18 '16 at 12:04
-
16
assuming chrome is his default browser: start http://url.site.you.com/path/to/joke
should open that url in his browser.

Doon
- 19,719
- 3
- 40
- 44
-
This is the best answer, unless it must run in chrome which I wouldn't assume is the case. – sp_nz Jul 04 '21 at 22:42
10
start "Chrome" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 2"
start "webpage name" "http://someurl.com/"
start "Chrome" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 3"
start "webpage name" "http://someurl.com/"
3
@ECHO OFF
"c:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app="https://tweetdeck.twitter.com/"
@ECHO OFF
"c:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --app="https://web.whatsapp.com/"

Rohit Salecha
- 893
- 11
- 9