C:\_G\WWW\~ELISANET\INFO\tscmd174.html
<http://www.elisanet.fi/tsalmi/info/tscmd174.html>
Copyright © 2003- by Prof. Timo Salmi  
Last modified Mon 10-Dec-2018 22:35:33

 
Assorted NT/2000/XP/.. CMD.EXE Script Tricks
From the html version of the tscmd.zip 1cmdfaq.txt file
To the Description and the Index
 

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]
 

[Previous] [Next]

C:\_G\WWW\~ELISANET\INFO\tscmd174.html
C:\_G\WWW\~ELISANET\FTPCMD\TSALMI.CMD /tscmd174
http://www.elisanet.fi/tsalmi/info/tscmd174.html
file:///c:/_g/www/~elisanet/info/tscmd174.html