batch file to go to website?

November 5, 2010 at 16:58:09
Specs: Windows 7
i tried:
@echo off
cls
set var1=http://www.swagbucks.com/?sfp=h&t=w&p=1&q=
start %var1%%random%
but i get an error. i want it to go to var1 with a random number added to the end.
any help?

See More: batch file to go to website?

Report •

#1
November 5, 2010 at 17:33:45
@echo off
cls
set var1=http://www.swagbucks.com/?sfp=h^&t=w^&p=1^&q=
start "%var1%%random%"

You have to escape the ampersands.

Can I put a question here?


Report •

#2
November 5, 2010 at 17:56:01
it brings up annother instance of cmd with a title of the websight i want...

Report •

#3
November 5, 2010 at 20:16:54
@echo off
cls
set var1=http://www.swagbucks.com/?sfp=h^&t=w^&p=1^&q=
start "P:\a\t\h\Internet Browser.exe" "%var1%%random%"

Give that a try, for some reason mine opens up in firefox on it's own. Change the path to fit the browser of your choice.

Can I put a question here?


Report •
Related Solutions


Ask Question