Google Chrome fails to open HTML links or files

05
2013-12
  • Nikola Malešević

    There are two persons using my computer, so I made two shortcuts to the application, each one having its own argument "--user-data-dir=""" so that each of users has unique settings.

    All was working well, but I was annoyed because the links from external applications (FeedReader, Visual Studio help, Microsoft Word document links) or local HTML files were opened in default Google Chrome installation, therefore not using my folder of preference (which is one of the two above mentioned).

    So, I went on to changing the following registry setting:

    Computer\HKLM\SOFTWARE\Classes\ChromeHTML\shell\open\command = ""C:\Users\Witchunter\AppData\Local\Google\Chrome\Application\chrome.exe" --user-data-dir="c:\Users\Witchunter\AppData\Local\ChromeUserData\shortcut-1311099461053""

    The browser acted weird when I changed this settings, opening but not displaying HTML file, instead showing "New Tab". Each consecutive opening of the file opened another instance of the browser, again with only "New Tab" opened, as if I run it from desktop shortcut.

    I tried reverting setting to:

    Computer\HKLM\SOFTWARE\Classes\ChromeHTML\shell\open\command = ""C:\Users\Witchunter\AppData\Local\Google\Chrome\Application\chrome.exe"

    to no avail. The browser acts as described, the only thing it is not using my settings, but default ones. The operating system is Windows 7 x64.

    Had anybody else have this issue? How can I resolve the problem?

    I found this question on SuperUser, but it is somewhat old, relevant to Mac and not answered.

  • Answers
  • Nikola Malešević

    Well, it appears nobody encountered this situation before. Since someone could have the same issue some time in the future, I decided not to delete my own question, but to answer it.

    I fixed the issue by adding -- "%1" switch, so the registry entry looks like this:

    [Computer\HKLM\SOFTWARE\Classes\ChromeHTML\shell\open\command] "C:\Users\Witchunter\AppData\Local\Google\Chrome\Application\chrome.exe" --user-data-dir="c:\Users\Witchunter\AppData\Local\ChromeUserData\shortcut-1311099461053" -- "%1"

    It is very important that "%1" switch is the last one and that there is a space character between -- and "%1". I am not sure why is this particular switch used this way, but it is crucial to have a space character in between. If this character is not present, new Chrome window will open up displaying "New Tab".

    Hope someone finds this useful.


  • Related Question

    Chrome: Can't open another Chrome browser after inserting "-pinned-tab-count=x" in target address under Chrome Shortcut icon
  • Questioner

    I use Win XP. I'm using Google Chrome Dev Ver:4.0.249.30. I followed a guide as to how to pinned my tabs on Google Chrome permanently.

    http://www.howtogeek.com/howto/7264/make-google-chrome-open-with-pinned-tabs/

    In my Chrome shortcut key, this is how my Target address looks like after following the guide:

    "C:\Documents and Settings\XXX\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --pinned-tab-count=3 "website-1-address" "website-2-address" "website-3-address"

    Note: the "website-1-address" , "website-2-address" , "website-3-address" is where I put the website address I desire, without the quotations. The reason I can't write down the website address is because I have a brand new account at superuser.com and thus, can't post more than one link. Grr.

    And it works as intended, when I open a new Chrome browser, the 3 websites are now represented as small icons in the newly opened Chrome tab bar.

    However, when I attempt to open another Chrome browser (by clicking on the same shortcut Chrome icon with the target address modified), the new Chrome browser doesn't appear. Instead, what happens is, in the current Chrome browser, 3 new normal tabs popped up. The 3 tabs are the same 3 websites as indicated above. With every click to the Chrome shortcut icon, the 3 same tabs open up in the current Chrome browser instead of opening up a new Chrome browser.

    The question is, what do I have to change to make sure that after a Chrome browser is open, I'm able to open another Chrome browser, with the permanent pinned tab feature in tact of course.

    Thanks in-advance.


  • Related Answers
  • mlsteeves

    As awesome as superuser is, because you are using the developer stream (ie alpha) version of Chrome, you should probably ask the question through the chromium site, so that the developers working on Chrome will likely see it. There is a chance that this could be a bug.

    Here is a link that describes where to ask the questions/check that the issue already exists:

  • Area 51

    You are right, I should have posted the problem on Google Chrome forums, but I only thought about it after posting my thread here at superuser.com :(

    However, I found the answer to my problem, thought I share it here in case there are others like me.

    The trick is, under the target address in the Chrome shortcut icon, you should only have the following:

    "C:\Documents and Settings\XXX\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --pinned-tab-count=3

    As you can see, I've not placed the website addresses in the target address. Instead:

    A. Click on the Wrench icon on Chrome,
    B. Go to Options.
    C. Under the Basics tab, the section that says On Startup, tick Open the Following Pages:
    D. And proceed to enter in the website address that you wish to have permanently pinned on Google Chrome.

    Doing it this way solves the problem of preventing me in opening additional Chrome browsers.