Forcing Google Chrome to open with predefined settings

Discussion in 'other software & services' started by m00nbl00d, Jun 13, 2011.

Thread Status:
Not open for further replies.
  1. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    I wonder if anyone knows how to do it... :doubt:

    I installed Google Chrome to a relative, and I've created different profiles for different tasks. I also configured Chrome's shortcuts to start in Incognito and a few other flags.

    It has been set as the default browser.

    My relative wants to click links in the e-mails received in Thunderbird, and this automatically creates a new Google Chrome profile, and this means none of settings I've defined apply. This starts a brand new profile. Not to mention it won't open in Incognito, etc, because these settings are applied in the shortcut.

    Instead of chrome.exe shortcuts, I create a batch files to start Chrome. I'm wondering if, somehow, it's possible to force Chrome to execute via one of these batch files, when my relative clicks a link in an e-mail? o_O

    My relative finds right-clicking a link and copying an annoying task.
     
  2. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    OK... I managed something...

    I changed so far a registry key HKCU\Software\Classes\http\shell\open\command to poing to the batch file, rather than to chrome.exe, and it initiates the proper profile. But, it won't open the URL, though.

    I'll change every possible registry key associated with this stuff, and see what comes out.
     
  3. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    I got it to open! :D

    And, it opens in the same window... :)

    -edit-

    If you got different profiles, and would like to have a specific profile to open the links you get in your e-mail, just let me know, and I'll mention what needs to be done. I'll note everything down, so I don't miss a step.
     
  4. tobacco

    tobacco Frequent Poster

    Joined:
    Nov 7, 2005
    Posts:
    1,497
    Location:
    British Columbia
  5. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    That would be an option for those not minding to open the URLs within Thunderbird itself, yes. :thumb:

    Not what I was aiming and what I achieved to do, though. ;)
     
  6. hpmnick

    hpmnick Registered Member

    Joined:
    Mar 24, 2011
    Posts:
    186
  7. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    I'm aware of those templates. I came across them the other day. I still haven't looked at them, though.

    But, would those templates let me achieve the same results? That is, would they change Windows registry, so that a specific Google Chrome profile becomes the default browser?

    I manually changed the registry to achieve it. It only required me to change two entries, so no big deal.

    Thanks for the link, though. :thumb: I totally forgot about the templates. I need to play with them.
     
  8. hpmnick

    hpmnick Registered Member

    Joined:
    Mar 24, 2011
    Posts:
    186
    Well, the policy templates would change the user profile location... and if you made chrome the default browser, it would open the new user profile every time. I'm pretty certain you can still specific different locations in a command switch if you didn't want to use the assigned user profile directory.

    .. but obviously what you did works just as well.. I figured I'd just mention an alternate way of doing things..
     
  9. Trooper

    Trooper Registered Member

    Joined:
    Jan 26, 2005
    Posts:
    2,825
    What's all this talk about flags? I'm new to Chrome, trying to learn the ropes.

    Question: Are there any speed performance tweaks for Chrome like there are for Firefox?

    TIA.
     
  10. Hungry Man

    Hungry Man Registered Member

    Joined:
    May 11, 2011
    Posts:
    9,148
    you can type "about:flags" into the url bar and have a look
     
  11. Trooper

    Trooper Registered Member

    Joined:
    Jan 26, 2005
    Posts:
    2,825
    Will do. Thank you.
     
  12. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    It won't reveal to you all Chromium flags. Look here, as well: -http://src.chromium.org/svn/trunk/src/chrome/common/chrome_switches.cc
     
  13. Trooper

    Trooper Registered Member

    Joined:
    Jan 26, 2005
    Posts:
    2,825
    Is that for Google Chrome as well or is it just Chromium specific?
     
  14. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    Both. But, some may only work with Chromium, like --enable-compact-navigation. I don't think the latest stable version already has that feature (Hidden address bar.)

    This one, for example, won't work with Chromium, because it lacks a built-in PDF viewer - --enable-print-preview.

    There may be others.
     
  15. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    And, I do appreciate the fact you took the time to reply! :thumb:

    Unfortunately, it seems that, if we want to run Chrome/Chrome with flags, such as --safe-plugins, we actually need to do it the way I did. I took a quick look at the policy templates and they won't allow us to start Chrome/Chromium with flags.

    Now, there's something I'd like to discuss about... Anyone is free to join the discussion. Who knowns what comes out of it. :)

    As I mentioned, I managed to force one profile become the default browser from one account. This browser's/This install's (as there are different Chrome/Chromium installs place in Program Files) profile is placed inside the user space. It makes sense.

    No problems with having this Chrome profile as the default browser for the account in question. I've done it.

    Now, I've set up a different user account for general web browsing. Chrome's install is the same one as in the other account. It's placed in Program Files\Chrome\Install_01 (as an example).

    The tricky part comes now. How to make the profile within this account be the default browser of the account?

    Remember that, to actually make this Chrome install the default browser in the e-mail client account, I had to change entries in HK_Classes_Root. This means it was done system-wide, and by making Chrome be the default browser in the e-mail client user account, I had to point to the Chrome's profile in that account.

    Settings in both profiles would be same, as the profile settings for general web browsing would be exactly the same as it is for the profile in the e-mail client user account.

    The obvious way would be to create a common folder to the accounts, and place the profile there instead, like in System Root (X:\), and then protect it.

    But, ignoring this option, what other way would there be? Windows 7 allows to have different GPO (for different users), but unfortunately not for registry.

    Would there be a way to change the tweaks I've done in HK_Classes_Root to be different for each account, pointing to different Chrome profiles?

    How to do it, that's the question... :doubt:

    Any tips are welcome. :thumb:


    Thanks
     
  16. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    -edit-

    Perhaps the flag --multi-profiles would be what is needed. I need to verify it.

    -edit-

    Never mind, it has nothing to do with it. It's for syncing stuff, setting different e-mail and that stuff. -http://chromestory.com/2011/04/chromium-gets-advanced-multi-profiles-and-profile-switcher/

    -new edit-

    Looking at this link here -http://chromestory.com/2010/11/advanced-multi-profile-google-chrome-in-the-making/ it may actually be what I'm looking for. I'll test it and report back. Crazy moments... lol Crap, different profiles within the same window only?... OK... But, not what I was looking for. lol

    -new edit-

    OK. I think I can try a different approach. I can change the registry keys I changed only to start Chrome with the flags I want, but create a clean profile instead, rather than a predefined one. I believe this will work. Unfortunately the only flag I could make use of and that would allow me to choose the name of the profiles by clicking CTRL+M no longer is valid. The flag in question was something like --enable-udd-profiles or something like that.
    Does anyone know any flag that would do the same or some other option? I'm not spotting anything in the file switches_cc I previously mentioned. Maybe I'm overseeing it.
     
    Last edited: Jun 14, 2011
  17. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    This is becoming a daunting task... :argh:

    The only way I coud possibly do what I want, without having profiles with the name User Data, would be to install a single instance of Google Chrome/Chromium and have different profiles by applying policy templates.

    Since there are different Chrome/Chromium installs, each one with its profile, I don't think the policy templates would apply. I still haven't tried it, though.

    The only solution would be to have User Data as the name of the created profile for the general web browsing Chrome/Chromium install.

    Nothing is ever easy. o_O
     
  18. Trooper

    Trooper Registered Member

    Joined:
    Jan 26, 2005
    Posts:
    2,825
    Since you seem to know a lot about Chrome, I was wondering if there is anything that can be done to limit the disk i/o I keep hearing on my hard drive. The only thing I've read is to disable the anti phishing support, but what good is that?

    Thank you.
     
  19. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    You could try to limit the disk cache size.

    This is what I have in my shortcut:

    Code:
    chrome.exe --disk-cache-dir="<new_cache_directory>\Cache" --disk-cache-size=1
    
    You don't need to create a new Cache folder... But, I did it that way, due to other restrictions I got in place, so that other Chromium profiles won't even write to the cache folder. The 1 means the cache will have as a limit 1 MB. Otherwise, there would be hundreds of MBs. o_O

    I also limited media cache size.

    Code:
    --media-cache-size=1
    
     
  20. Trooper

    Trooper Registered Member

    Joined:
    Jan 26, 2005
    Posts:
    2,825
    Can this be done for Google Chrome as well? I know you run Chromium so just wanted to make sure.

    Thanks and will try this tonight when I get home. :)
     
  21. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    Yes, it can be done for Chrome as well.
     
  22. Trooper

    Trooper Registered Member

    Joined:
    Jan 26, 2005
    Posts:
    2,825
    Thanks.

    Regarding the cache folder. If I am not going to use one, I would think I need to take that out of the code you posted above correct?

    Jim
     
  23. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    Yes, that is correct. Google Chrome creates a cache folder by itself, so no need to have that part, at all. Just limit the size to 1. Do not limit it to 0, because it doesn't work.
     
  24. Trooper

    Trooper Registered Member

    Joined:
    Jan 26, 2005
    Posts:
    2,825
    So would it just be.

    Code:
    chrome.exe --disk-cache-size=1
     
  25. m00nbl00d

    m00nbl00d Registered Member

    Joined:
    Jan 4, 2009
    Posts:
    6,623
    I still haven't made my mind regarding which approach I'll take regarding the two default profiles, for each user account.

    There are 3 ways, so far:

    * Have only 1 Google Chrome/Chromium install and use policy templates to choose what names I want for each profile.

    * Have multiple Chrome/Chromium installs, and under each account have a profile with name User Data, which is the default profile created by Chrome/Chromium.

    * Have a common user profile folder, with a name of my preference, that would be shared by both user accounts.

    But, I've been thinking of a 4 option.

    While researching for something, I thought of SuRun -http://translate.google.com/translate?u=http%3A%2F%2Fkay-bruns.de%2Fwp%2Fsoftware%2Fsurun%2F&langpair=de|en&hl=de&safe=active&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools

    SuRun will launch an elevation request for the current user only, and not globally. So, this would be an alternate way of making changes to the Windows registry in HKEY_CLASSES_ROOT. The changes would be done only for the user account, and not for the machine.

    I never used SuRun, but I believe... If I'm interpreting it correctly... this is what would happen...

    So, if I do the same for different user accounts, then I'll be able to point Chromium, as the default browser, to different user profile folders with names of my liking.
     
    Last edited: Jun 16, 2011
Loading...
Thread Status:
Not open for further replies.