How to format a link to open in Chrome instead of IE?

Is it possible to force a link within a SharePoint site to open in a certain browser?
We have an online system that works best in Chrome. I've placed a link to this system in a library on our site - however, it will open in IE if that happens to be your default browser.
Ideally, a user would click the link and it would open in Chrome, no matter what his/her default browser is.
Someone asked this question on another forum and was given this answer:
OOTB, SharePoint only opens in browser which is set as default.
However, if this customization is absolutely necessary,you can develop a server side web part in which you can generate a link.Clicking on which will execute
Chrome.exe process and open the link in browser.
Code snippet to call Chrome.exe would be as follows:
System.Diagnostics.Process.Start("chrome.exe",
"http://sp.path.to/your/file.doc")
My issue is that I don't know much code, where to place this code, or how to make it execute when a link is clicked. Can anyone give me a push in the right direction?
FYI: Here's the link to the other forum where this question was asked. I can't place a hyperlink in the body of this question b/c my account is not yet verified: sharepoint.stackexchange.com/questions/132858/format-link-to-open-in-desired-browser-chrome

Hi,
This is server side code , you should write in your C# code behind method for Click event of Link Button .
- Use 1st part code in your button event handler method. (Replace <username> with current user name), best way is to find the crome.exe location at your dev machine , and paste the path here -
process.StartInfo.FileName = @""; , default location is in user's appdata folder. Test the code.
- If the above code works , and if your crome.exe is in user's appdata folder , then you will need to find dynamic location of AppData folder for every user. That means the path should not be hard coded. The 2nd part of the code is an hint for how you can
find the appdata path in C#. Something like this
//var cromePath = @"C:\Users\<UserName>\AppData\Local\Google\Chrome\chrome.exe";
var cromePath = Path.Combine(Environment.GetFolderPath(
Environment.SpecialFolder.ApplicationData), "\Local\Google\Chrome\chrome.exe");
using (var process = new Process())
process.StartInfo.FileName = cromePath;
process.StartInfo.Arguments = "your url";
process.Start();
So the step will be
- First try a direct call to crome,
var cromePath = @"crome.exe";
- if it not works , then try with hardcoded path of crome.exe from your dev machine for current user -
var cromePath = @"C:\Users\<currentUserName>\AppData\Local\Google\Chrome\chrome.exe";
- And if this work , then try it with dynamic path for any user, find appdata folder location through code 
var cromePath = Path.Combine(Environment.GetFolderPath(
Environment.SpecialFolder.ApplicationData), "\Local\Google\Chrome\chrome.exe");
Hope this will help, if you are a C# developer then you can easily understand  the concept.
Thanks
Ganesh Jat [My Blog |
LinkedIn | Twitter ]
Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

Similar Messages

  • How do I set links to open in Chrome instead of Safari

    I find that using Chrome as my browser things work better. However, if someone sends me a link it always opens in Safari can anyone tell me how to make Chrome my default browser

    There is no way to change the default browser.
    I believe that if you use the GMail mail App then links can be opened in Chrome.

  • I just downloaded Google Chrome and use both Google Chrome and Firefox as my browser. However, whenever I click on an email link, it opens up Chrome and I want it to open Firefox. How do I fix this?

    I just downloaded Google Chrome and use both Google Chrome and Firefox as my browsers. However, whenever I click on an email link, it opens up Chrome and I want it to open Firefox. How do I fix this?

    Go into FF Preferences & set it to be your default browser.  This way when you click on an email link in Chrome, FF will open.

  • How can I add links to open xml and csv files stored in another location? Please advice how to place links in my frame maker document?

    Hi,
    I would like to know as to how can I add links to open xml and csv files stored in another location? Please advice how to place links in my frame maker document?
    Kindly advice.
    Thanks
    Priya

    Special > Hypertext > Command "open document" will do its best to open the target document inside FrameMaker, which may not be much help; Special > Hypertext > Command "message …" will use the application you specify. The user guide for 7.0 says this about absolute links, and I don't think anything has changed since:
    For example, to start PaintBrush and open the Ship.pcx file on drive C you would use the command message system pbrush.exe C:/Ship.pcx
    I've not often used a relative link, and not recently: the same source says
    folder levels are separated by a slash / even in Windows and Mac
    [relative links] FrameMaker searches for a relative pathname beginning in the folder that contains the current document
    [absolute links] FrameMaker searches for an absolute pathname beginning at the top of the file system. In Windows, the absolute pathname begins with the drive specifier, a colon and a slash.

  • How can I get iTunes to open to Library instead of the iTunes Store.  It does it on one of my computers.

    How can I get iTunes to open to Library instead of the iTunes Store.  It does it on one of my computers, but I don't know how I did it.

    For me, iTunes always opens to whatever I had selected previously when it was closed.
    In other words, if I had Apps selected when I closed iTunes, the next time I opened iTunes it would be on Apps.

  • How to have Safari links always open in same window

    I've been researching how to have Safari always open links in the same window, but it appears this can't be done?  I've seen this third party app, but am afraid of installing something that doesn't come from the app store because it might harm my macbook.  Does anyone have any thoughts about how to have links always open in the same window? Or how to find out if I can trust this app:
    http://canisbos.com/linkthing

    You can reset the folio by triple tapping the title in the nav bar.
    Bob

  • When i click on a link in my fb feed it opens in fb app. How can i get links to open in safari or youtube?

    How can i get links in my fb feed to open up in safari or youtube rather than fb app?

    Go to FB's support site. That is controled by the FB app.

  • How to create a link to open an existing bid invitation?

    Hello everyone,
    I created a custom web transaction that displays some bid invitation information. I need to create a link that opens the same bid invitation in transaction BBP_BID_INV.
    When I used "CALL TRANSACTION", I got the SAP GUI version. I need to get the bid invitation opened in Web Version (service BBP_BID_INV).
    Your help is appreciated,
    Abdullah Azzouni

    Hello Marcin,
    Well, I'm using this function module to display certain information users will need. Some users would like to be able to access the existing Bid Invitation transaction in order to change some information. This is why I need a link in my custom transaction to do that.
    It would make more sense to call the existing transaction BBP_BID_INV. I could call it at the moment, but I get the SAP GUI version. I need the web version.
    Regards,
    Abdullah

  • How do I stop links from opening in new tabs

    Any link I click on opens a new tab. I want them to open in the same tab

    Hello,
    You need to check your mouse or mouse settings because if you click on a link with middle mouse it would open a new tab, if you checked your hardware and settings but the problem still the same, go to:
    '''Tools '''>''' Options '''> '''Tabs''' > Open links that open in a new window and change the option to new window.
    If you have the Tab Mix Plus addon installed then '''Tools''' > '''Tab Mix Plus options''' >''' Links'''.
    Sincerly,
    Black Thunder

  • How to make a link to open a movie in Quicktime?

    Hi,
    i need a script (used in www.Apple.com/trailers) that has the following features:
    When you click on a button, the linked movie opens in Quicktime player. Please no "object" or "embed", i need javascript in order to be compatible with the windows crap world.
    Thanks!

    In the examples included with the weekly builds there is a CustomLinkEventHandler.as example.  Passing parameters would be done in the CustomClickHandler function.  You could attach the parameters to the LinkElement as user styles using the setStyle API.
    Hope that helps,
    Richard

  • Forcing link to open in Quicktime instead of VLC

    Hi,
    The page www.railaway.tv has its video in WMV format, which stream can be read by QuickTime with Flip4Mac. But unfortunately they make the links with a Flash button, so I can not see (and copy) the link and paste it in QuickTime. When I click on the link in Safari, it will launch VLC, which can not read it. When I remove VLC from my Mac, it will open Windows Media Player, which can not read it (and I can not save the movie from WMP). When I remove WMP, Safari gives me an error that it can not open the link. But it's proven that QT can! Someone gave me a link to one of the clips on the site, and pasting it in QT works. How can I force Safari to open the file in QT?
    This is the direct link to one film:
    mms://193.242.108.40/watchingme4od/europe/switzerland_winter.wmv
    And no, selecting a .wmv movie in the Finder, get Info and change all wmv files to open in QT doesn't work. It only works then for full movie files, not for mms links.
    Where can I change the file type to open in QT. Which actually is the file type of the link, as it is not a windows movie (yet). It's a stream.

    Hi,
    This is server side code , you should write in your C# code behind method for Click event of Link Button .
    - Use 1st part code in your button event handler method. (Replace <username> with current user name), best way is to find the crome.exe location at your dev machine , and paste the path here -
    process.StartInfo.FileName = @""; , default location is in user's appdata folder. Test the code.
    - If the above code works , and if your crome.exe is in user's appdata folder , then you will need to find dynamic location of AppData folder for every user. That means the path should not be hard coded. The 2nd part of the code is an hint for how you can
    find the appdata path in C#. Something like this
    //var cromePath = @"C:\Users\<UserName>\AppData\Local\Google\Chrome\chrome.exe";
    var cromePath = Path.Combine(Environment.GetFolderPath(
    Environment.SpecialFolder.ApplicationData), "\Local\Google\Chrome\chrome.exe");
    using (var process = new Process())
    process.StartInfo.FileName = cromePath;
    process.StartInfo.Arguments = "your url";
    process.Start();
    So the step will be
    - First try a direct call to crome,
    var cromePath = @"crome.exe";
    - if it not works , then try with hardcoded path of crome.exe from your dev machine for current user -
    var cromePath = @"C:\Users\<currentUserName>\AppData\Local\Google\Chrome\chrome.exe";
    - And if this work , then try it with dynamic path for any user, find appdata folder location through code 
    var cromePath = Path.Combine(Environment.GetFolderPath(
    Environment.SpecialFolder.ApplicationData), "\Local\Google\Chrome\chrome.exe");
    Hope this will help, if you are a C# developer then you can easily understand  the concept.
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • How to get icloud to open in chrome instead of IE on windows 8

    Hi,
         i have windows 8 and in my apps i have - icloud, contacts and calender which clicking on them opens icloud on internet explorer is there a way to get them to open up on google chrome instead
    Thanks intelligent community =D
    Chrisdion Altoft

    Hi,
    This is server side code , you should write in your C# code behind method for Click event of Link Button .
    - Use 1st part code in your button event handler method. (Replace <username> with current user name), best way is to find the crome.exe location at your dev machine , and paste the path here -
    process.StartInfo.FileName = @""; , default location is in user's appdata folder. Test the code.
    - If the above code works , and if your crome.exe is in user's appdata folder , then you will need to find dynamic location of AppData folder for every user. That means the path should not be hard coded. The 2nd part of the code is an hint for how you can
    find the appdata path in C#. Something like this
    //var cromePath = @"C:\Users\<UserName>\AppData\Local\Google\Chrome\chrome.exe";
    var cromePath = Path.Combine(Environment.GetFolderPath(
    Environment.SpecialFolder.ApplicationData), "\Local\Google\Chrome\chrome.exe");
    using (var process = new Process())
    process.StartInfo.FileName = cromePath;
    process.StartInfo.Arguments = "your url";
    process.Start();
    So the step will be
    - First try a direct call to crome,
    var cromePath = @"crome.exe";
    - if it not works , then try with hardcoded path of crome.exe from your dev machine for current user -
    var cromePath = @"C:\Users\<currentUserName>\AppData\Local\Google\Chrome\chrome.exe";
    - And if this work , then try it with dynamic path for any user, find appdata folder location through code 
    var cromePath = Path.Combine(Environment.GetFolderPath(
    Environment.SpecialFolder.ApplicationData), "\Local\Google\Chrome\chrome.exe");
    Hope this will help, if you are a C# developer then you can easily understand  the concept.
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • Is there a way to make a linked PDF open in Acrobat instead of the browser?

    I would like to make a PDF open in Acrobat instead of the browser, so that the user can see its interactive features. Is there a way to do this in Muse? Or does it always spend on the user's browser settings?

    This would depend on the browser plugin installed , if browser does not have reader plugin then pdf will not open in browser.
    Not much can be done via Muse , but you can try some settings on pdf like password protected etc.
    Thanks,
    Sanjit

  • How to force external links to open in new browser window/tab?

    Greetings. I'm here because searching elsewhere kept coming up with references to javascript. I've created an interactive PDF with both internal and external links. It works just fine when viewed in either Acrobat or Reader. However, it is being downloaded to users' browsers and when they access the external URLs, the new sites replace the existing page in the same window.
    Is there a simple way for me to include an action in the PDF prior to distribution that will force it to open external URLs in a new browser window or tab?
    And for the record, I barely know how to spell Javascript, much less how to write or implement it. So if there is a simple solution, I hope you can also help walk me through the steps to implement it.
    Thanks a ton.

    There are two issues here:
    - How to do it using JS
    - How to do it in a non-Adobe browser plugin
    The first is pretty straight forward. You use a code like this, replacing the dummy URL with your own:
    app.launchURL("http://www.example.com", true);
    The second issue is more problematic, and in fact there isn't really a solution to it. If the plugin used supports this method then it will work, if not, then you're out of luck. Unfortunately, outside of the Adobe software I don't think that any other plugin supports it.

  • How do I get links to open without copy and paste?

    I just started using Firefox, have used Thunderbird for a couple of years. Since using Firefox when I click on links in email they don't open. I have to copy the link then paste it to open.How do i fix this?
    Thanks for any and all help!
    Chigar

    Is Firefox the default browser?
    https://support.mozilla.org/en-US/kb/Hyperlinks-in-Messages-Not-Working#w_check-that-the-operating-systems-default-browser-is-specified

Maybe you are looking for

  • How do I use AE to allow more than one device with my cable modem?

    I connected by AE to my cable modem at my house in Japan and it works fine on "bridge mode," but only for one device at a time (this laptop, but not my iPod Touch, or vice versa). As soon as I connect a new device, it will kick the other one off. It

  • How to give ** bydefault in password in module pool screen .

    Hi experts how to give  *******  by default in password in module pool screen . Thanks

  • Sync/Async brdige error in BPM

    Hi,    I am working on RFC-TO-Webservice scenario(Synchronous) and I am using the BPM in this scenario. In BPM just I have used 2 steps. Receive - Opened Sync/Async bridge Send - Synchrouns step Send - Cloase the Receive step Send - Asynchrous send s

  • Imported PAL VOB files are misinterpreted as 540 pixels high

    I'm trying to import PAL VOB files into an FCP 5.0.4 sequence and though the import and playback goes well, the files are wrongly reported as being 720x540 instead of 720x576, leaving me with unusable footage because the interlaced PAL video is rende

  • Standard procedure to do repartitioning !

    Hi I have an infocube and I want to repartition it. Now what standard procedure I should follow considering I want to make a back up of the Infocube. To make the backup infocube I cant use the cubes data as it is aggregated. Should I use the DSO to m