This page is edited from the 1cmdfaq.txt faq-file contained in
my tscmd.zip
command line interface (CLI) collection. That zipped file has much
additional material, including a number of detached .cmd script
files. It is recommended that you also get the zipped version as a
companion.
Please see "
The Description and
the Index page" for the conditions of usage and other such
information.
174} How to write a script to launch a URL invoking the default browser?
In brief, e.g.
@echo off & setlocal enableextensions
start "" "http://www.elisanet.fi/tsalmi/info/tscmd.html"
endlocal & goto :EOF
In the above the browser that is invoked depends on which file type is
associated with the .php .htm or whatever extension. For example
We could also write
@echo off & setlocal enableextensions
set target_=http://www.elisanet.fi/tsalmi/info/tscmd.html
set Program=%ProgramFiles%\Mozilla Firefox\firefox.exe
if defined ProgramW6432 set Program=%ProgramFiles(x86)%\Mozilla Firefox\firefox.exe
"%Program%" -requestPending -osint -url "%target_%"
endlocal & goto :EOF
or for the Internet Explorer
@echo off & setlocal enableextensions
set target_=http://www.elisanet.fi/tsalmi/info/tscmd.html
"%ProgramFiles%\Internet Explorer\iexplore.exe" "%target_%"
endlocal & goto :EOF
In Windows 7 and 10 [Open with --> Choose another application]