View Full Version : Forcing Google Chrome to open with predefined settings
m00nbl00d
June 13th, 2011, 07:25 PM
I wonder if anyone knows how to do it... :-\
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? ???
My relative finds right-clicking a link and copying an annoying task.
m00nbl00d
June 13th, 2011, 07:34 PM
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.
m00nbl00d
June 13th, 2011, 08:08 PM
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.
tobacco
June 13th, 2011, 08:34 PM
....or...... you could just install the TB extension - "Thunderbrowse" https://addons.mozilla.org/en-US/thunderbird/addon/thunderbrowse/
Works like a charm ;)
m00nbl00d
June 13th, 2011, 10:13 PM
-{ Quote: "....or...... you could just install the TB extension - "Thunderbrowse" https://addons.mozilla.org/en-US/thunderbird/addon/thunderbrowse/
Works like a charm ;)" }-
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. ;)
hpmnick
June 13th, 2011, 10:54 PM
http://chromium.googlecode.com/issues/attachment?aid=807650006000&name=policy_templates+%2815%29.zip&token=67241713e7b21239002808420936331f
This is the link to the group policies. You can set most command line switches, including the profile location, through group policy. I use it to turn WebGL off, and set it to never use a proxy... but you can also force install extensions, and a bunch of other stuff as well..
m00nbl00d
June 13th, 2011, 11:00 PM
-{ Quote: "http://chromium.googlecode.com/issues/attachment?aid=807650006000&name=policy_templates+%2815%29.zip&token=67241713e7b21239002808420936331f
This is the link to the group policies. You can set most command line switches, including the profile location, through group policy. I use it to turn WebGL off, and set it to never use a proxy... but you can also force install extensions, and a bunch of other stuff as well.." }-
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.
hpmnick
June 14th, 2011, 10:10 AM
-{ Quote: "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." }-
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..
Trooper
June 14th, 2011, 01:35 PM
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.
Hungry Man
June 14th, 2011, 02:24 PM
you can type "about:flags" into the url bar and have a look
Trooper
June 14th, 2011, 03:07 PM
-{ Quote: "you can type "about:flags" into the url bar and have a look" }-
Will do. Thank you.
m00nbl00d
June 14th, 2011, 03:11 PM
-{ Quote: "Will do. Thank you." }-
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
Trooper
June 14th, 2011, 04:00 PM
-{ Quote: "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" }-
Is that for Google Chrome as well or is it just Chromium specific?
m00nbl00d
June 14th, 2011, 05:24 PM
-{ Quote: "Is that for Google Chrome as well or is it just Chromium specific?" }-
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.
m00nbl00d
June 14th, 2011, 08:57 PM
-{ Quote: "[...]
.. but obviously what you did works just as well.. I figured I'd just mention an alternate way of doing things.." }-
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... :-\
Any tips are welcome. :thumb:
Thanks
m00nbl00d
June 14th, 2011, 09:05 PM
-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.
m00nbl00d
June 15th, 2011, 02:25 PM
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. :wacko:
Trooper
June 16th, 2011, 12:28 PM
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.
m00nbl00d
June 16th, 2011, 12:45 PM
-{ Quote: "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." }-
You could try to limit the disk cache size.
This is what I have in my shortcut:
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. :wacko:
I also limited media cache size.
--media-cache-size=1
Trooper
June 16th, 2011, 01:05 PM
-{ Quote: "You could try to limit the disk cache size.
This is what I have in my shortcut:
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. :wacko:
I also limited media cache size.
--media-cache-size=1
" }-
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. :)
m00nbl00d
June 16th, 2011, 02:04 PM
-{ Quote: "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. :)" }-
Yes, it can be done for Chrome as well.
Trooper
June 16th, 2011, 02:12 PM
-{ Quote: "Yes, it can be done for Chrome as well." }-
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
m00nbl00d
June 16th, 2011, 02:16 PM
-{ Quote: "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" }-
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.
Trooper
June 16th, 2011, 02:17 PM
-{ Quote: "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." }-
So would it just be.
chrome.exe --disk-cache-size=1
m00nbl00d
June 16th, 2011, 02:20 PM
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.
m00nbl00d
June 16th, 2011, 02:21 PM
-{ Quote: "So would it just be.
chrome.exe --disk-cache-size=1" }-
Yes. You can also add the --media-cache-size=1, as well.
Hungry Man
June 16th, 2011, 03:06 PM
Disabling your cache can slow browsing. Just fyi. If you're having problems with a lot of disk access you can consider setting up a RAMDisk or just clearing your cache once in a while.
m00nbl00d
June 16th, 2011, 03:15 PM
-{ Quote: "Disabling your cache can slow browsing.[...]" }-
That's not my experience. And, I'm on a 128 Kbps connection for quite some time now. No slow browsing, at all.
Trooper
June 16th, 2011, 05:43 PM
-{ Quote: "Yes. You can also add the --media-cache-size=1, as well." }-
Thank you!
Will try these tonight and report back.
Cheers.
Sully
June 16th, 2011, 08:01 PM
-{ Quote: "Disabling your cache can slow browsing. Just fyi. If you're having problems with a lot of disk access you can consider setting up a RAMDisk or just clearing your cache once in a while." }-
It does slow it down a little bit, depending where you are going. I have an SSD drive, and once I found out how much I/O chrome was doing, I used both the command line parameter to limit the cache size as well as locate it to another drive (non SSD). I also used the RAMdisk approach as well. I didn't mind the RAMdisk, but because of what I do with my system, I opted for the cache on a normal hdd.
Sul.
Trooper
June 20th, 2011, 05:01 PM
-{ Quote: "Yes. You can also add the --media-cache-size=1, as well." }-
So would the correct path be?
C:\Users\username\AppData\Local\Google\Chrome\Application\chrome.exe --disk-cache-size=1 --media-cache-size=1
Thanks again. Its been a busy couple of days.
m00nbl00d
June 20th, 2011, 05:06 PM
-{ Quote: "So would the correct path be?
C:\Users\username\AppData\Local\Google\Chrome\Application\chrome.exe --disk-cache-size=1 --media-cache-size=1
Thanks again. Its been a busy couple of days." }-
Yes, that would be it. Google Chrome installs to the user space.
If you have a shortcut in the Desktop, for example, you'd just have to right-click it, go to Properties - Target and add --disk-cache-size=1 --media-cache-size=1 after chrome.exe. Just make sure you don't forget the blank space between chrome.exe and --disk-cache-size=1 --media-cache-size=1
Trooper
June 20th, 2011, 05:07 PM
-{ Quote: "Yes, that would be it. Google Chrome installs to the user space.
If you have a shortcut in the Desktop, for example, you'd just have to right-click it, go to Properties - Target and add --disk-cache-size=1 --media-cache-size=1 after chrome.exe. Just make sure you don't forget the blank space between chrome.exe and --disk-cache-size=1 --media-cache-size=1" }-
Awesome that's exactly what I did and then added to to the taskbar. I dont use shortcuts on my desktop. Too much clutter.
Will post back hopefully soon with results. Thanks so much. ;D
m00nbl00d
June 20th, 2011, 05:10 PM
-{ Quote: "Awesome that's exactly what I did and then added to to the taskbar. I dont use shortcuts on my desktop. Too much clutter.
Will post back hopefully soon with results. Thanks so much. ;D" }-
Hopefully, you won't experience any slowness. I don't. And, as I mentioned before I've been using a 128 kbps Internet connection. :argh: :argh:
But, each system will for sure react differently.
Trooper
June 20th, 2011, 05:13 PM
-{ Quote: "Hopefully, you won't experience any slowness. I don't. And, as I mentioned before I've been using a 128 kbps Internet connection. :argh: :argh:
But, each system will for sure react differently." }-
True and thanks for the reminder. I just tried it here at work with no ill effects. The true test will be when I get home.
One thing that is annoying with Chrome is when I do happen to watch any Comcast related videos, I see an advertisement video first. (Im using Adblock as well).
Now with Firefox and Adblock, no such thing happens. I guess that's just the way Chrome is? It is a Google browser after all and they use adverts for money. Do they some how prevent you from from blocking advert videos?
Trooper
June 22nd, 2011, 12:22 PM
Update: Tried those settings at home and can still hear the hdd thrashing like before. Its not terrible but annoying nonetheless. Firefox does not behave this way.
Maybe I will try Chromium just to compare.
Thanks again for the help!
m00nbl00d
June 22nd, 2011, 12:28 PM
-{ Quote: "Update: Tried those settings at home and can still hear the hdd thrashing like before. Its not terrible but annoying nonetheless. Firefox does not behave this way.
Maybe I will try Chromium just to compare.
Thanks again for the help!" }-
Did you also try to create a new Cache folder and point to there, as I've shown in one of my previous posts?
chrome.exe --disk-cache-dir="<new_cache_directory>\Cache" --disk-cache-size=1
Maybe a new folder is required? Try that.
Trooper
June 22nd, 2011, 01:06 PM
-{ Quote: "Did you also try to create a new Cache folder and point to there, as I've shown in one of my previous posts?
chrome.exe --disk-cache-dir="<new_cache_directory>\Cache" --disk-cache-size=1
Maybe a new folder is required? Try that." }-
I guess the directory has to be a sub-folder of where Chome is installed?
m00nbl00d
June 22nd, 2011, 01:18 PM
-{ Quote: "I guess the directory has to be a sub-folder of where Chome is installed?" }-
Anywhere. Imagine you place it at the Desktop, you'd need to point to there --disk-cache-dir="C:\Users\username\Desktop\Cache".
Trooper
June 22nd, 2011, 01:28 PM
-{ Quote: "Anywhere. Imagine you place it at the Desktop, you'd need to point to there --disk-cache-dir="C:\Users\username\Desktop\Cache"." }-
Cool will try this tonight.
Many thanks!
vBulletin® Copyright ©2000-2012, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2012, Wilders Security Forums