Reputation: 167
os.execute("start http://test.aspx?arg1=one&arg2=two")
I get this error:
'arg2' is not recognized as an internal or external command, operable program or batch file.
How to fix that?
Upvotes: 0
Views: 1670
Reputation: 80647
In shell languages, &
and ;
act as command separator. You need to enclose the command inside double-quotes for it to work..
os.execute("start \"http://test.aspx?arg1=one&arg2=two\"")
Or more simply:
os.execute([[start "http://test.aspx?arg1=one&arg2=two"]])
Upvotes: 2
Reputation: 23767
Windows interprets &
as command separator
os.execute'start "http://test.aspx?arg1=one&arg2=two"'
Upvotes: 2