Shortcut to open a website using a specific browser

I have a couple of browsers installed due to supports to different websites.  I need to create some shortcuts for opening website using specific browser.  Can someone advise how to create such shortcuts.  Thanks!
 

Question Info


Last updated September 14, 2018 Views 18,755 Applies to:

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

Hi Scott,

 

Thank you for posting your question in the Microsoft Community Forums.

 

Based on the information, you are trying to set default browser to open different websites in different browsers using shortcuts.

This is not possible as double clicking the shortcut will invoke whichever default browser is set and site will open in that. In order to open different websites in different browsers you will have to open the browser and type the address to open the site.

 

Hope the information helps.

 

Let us know if you need further assistance with Windows related issues. We will be happy to help.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

You can't do this with a shortcut as there can be only one browser file association. You can, however, do what you want with a batch file(s).

 Below is an example for you that will open a site in Internet Explorer.  (My default browser is Firefox.  I made this batch to enable quickly opening selected sites in IE.)
In this case I have a command line parameter so I can drag a link to it and I also added it as a Sent To shortcut.  That enables right clicking on a saved link and sending to IE.cmd (the name of my batch file).

You could replace the %1 with a hard coded URL if you like for a specific site.  Note of course, you will also need to set the program path and name per the browser you want to use.

start "" "\Program Files\Internet Explorer\iexplore.exe"  %1
exit

Technician / Consultant

8 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

That works well with IE

with Chrome I get:

[{000214A0-0000-0000-C000-000000000046}] Prop3=19,11 [InternetShortcut] URL=https://my_url.com/ IDList=

Any idea?

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

That seems to be the properties of a shortcut rather than a URL.   What exactly are you doing when that happens.

I don't have Chrome installed here to test it with a command line parameter, but the content of a batch file I made for a customer with this issue is shown below.  It worked fine with a hard coded URL. 

 The location of chrome.exe might be different for you - customize as needed.

%USERPROFILE%\AppData\Local\Google\Chrome\Application\chrome.exe http://carquestdirecthit.com/

Technician / Consultant

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

it works with Firefox and IE11 but not with Chrome

this one is bad:

start "" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"  %1
exit

the ones below work:

start "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"  %1
exit

start "" "\Program Files\Internet Explorer\iexplore.exe"  %1
exit

Chrome by itself appears quite happy as a browser and the hard-coded line below works too

start "" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"  http://www.google.ca
exit

The version of Chrome is:  33.0.1750.154 m

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

This issue caught my interest, and I've been digging into it.  I confirmed what you found with Chrome. 

IE and Firefox are programmed so that if a shortcut is passed on the command line they extract the URL and act on it. Chrome instead just displays the shortcut (.lnk file) as a file in the browser.


I have found a solution by writing a batch file with some VB script that internally exacts the URL from the shortcut passed in and then uses the URL with a Chrome command line.  This is working successfully,  I want to clean it up and test it a little more.  I will then post the code for you.


Technician / Consultant

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

I have been digging through stuff and testing with variations to no help

your VB script sounds like the right approach

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

I have been digging for possible solutions and other's experience, also trying different methods.  I always found Chrome is simply displaying the content of the shortcut. Your VB script sounds like the right approach.  It is also very beneficial since Google Chrome now appears to be the top browser.  Looking forward to your code.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

The script is below. It seems to work well.  I'll be interested to see how it goes for you. Careful re. word wrap.  I put all this in a file named ChromeIt.cmd

:: ChromeIt.cmd  03/18/2014 Tue 10:57:pm
:: This batch file will extract the URL from a shortcut to allow it to be
:: passed on a command line to the Chrome browser.  (IE and Firefox do that
:: on their own whereas Chrome opens the shortuct as a file.)
:: Credit to stackoverflow.com where some of this code was found.
:: GTS 03/18/2014

@echo off   
setlocal

Call :GetTarget "%~1" tgt
 
:GetTarget  
@echo off & setlocal
set gt=%temp%\_.vbs
echo set WshShell = WScript.CreateObject("WScript.Shell")>%gt%
echo set Lnk = WshShell.CreateShortcut(WScript.Arguments.Unnamed(0))>>%gt%
echo wscript.Echo Lnk.TargetPath>>%gt%
set script=cscript //nologo %gt%
For /f "delims=" %%a in ( '%script% "%~1"' ) do set target=%%a
del %gt%
endlocal & set %~2=%target%

:: For XP
:: Start "" "C:\Program Files\Google\Chrome\Application\chrome.exe"  %tgt%

:: For Windows 7
Start "" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" %tgt%

exit

Technician / Consultant

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

This works like a charm - great job and many thanks

I modified it to 'automatically' select the Chrome install directory depending on the OS.  I tested it with Win XP 32 bit and Win7 x64.  It could be further modified to confirm that Chrome is actually installed. See below:

:: ChromeIt2.cmd  03/21/2014 Fri  6:57:pm
:: This batch file will extract the URL from a shortcut to allow it to be
:: passed on a command line to the Chrome browser.  (IE and Firefox do that
:: on their own whereas Chrome opens the shortcut as a file.)
:: Credit to stackoverflow.com where some of this code was found.
:: GTS 03/18/2014

@echo off  
setlocal

Call :GetTarget "%~1" tgt
exit

:GetTarget 
 @echo off & setlocal
 set gt=%temp%\_.vbs
 echo set WshShell = WScript.CreateObject("WScript.Shell")>%gt%
 echo set Lnk = WshShell.CreateShortcut(WScript.Arguments.Unnamed(0))>>%gt%
 echo wscript.Echo Lnk.TargetPath>>%gt%
 set script=cscript //nologo %gt%
 For /f "delims=" %%a in ( '%script% "%~1"' ) do set target=%%a
 del %gt%
 endlocal & set %~2=%target%

:: add-on to your script

 IF exist "C:\Program Files (x86)"\. GOTO 64bit

  :: For 32 bit OS
  Start "" "%ProgramFiles%\Google\Chrome\Application\chrome.exe" %tgt%
  exit


  :64bit
  :: For Windows 7 x64
  Start "" "%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe" %tgt%
  exit

2 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.