Faster context switching with Chrome profiles

I have used Chrome profiles for a while. This is really good to seperate and isolate things like credentials between different instances of chrome. And when I mention this for other people, there are a lot that does not know about this gem of a feature.

I currently use 3 profiles, personal, work, and customer.

By using profiles I can now use the same portal for different rols, ex. the Azure Profile. I don’t need to log out and in between sessions. Just open the browser from the right shortcut.

This is all nice, however. One issue happend every time when I open links, ex. from Slack. Those whould be sent to my Default browser (was Edge).

My taskbar currently looks like this:
my browsers in the taskbar

The shortcuts goes to:

  • Edge (default)
  • Personal Profile
  • Customer Profile
  • Work Profile

Better browser switching

By using this nice tool called BrowserChooser, I can now choose my browser with the right profile directly when open link.
Welcomescreen of browserchooser2

That is all nice, but it also supports automaticly choosing a profile based on patterns in the link, ex. customer domain etc.

Another nice feature, is that I can automaticly choose the right browser based on patterns in the link, ex. customers domain etc.

Now we are talking. :)

Setup browser switching

First download the applications, this is a portable exe, so I manually put it in ‘C:\Program Files\Browser Chooser’. Then you will need to setup it as your default browser. Open the application, go to the setup (right top link), click on ‘Windows Default’, then ‘Add to Default programs’ and ‘Show Defaults Dialog*‘.

Add as default

Now you should be able to make BrowserChooser as your default browser.

Windows default dialog

Since BrowserChooser cannot use the same icons as in the taskbar directly from Chromes folders, you must copy them over to a place where it can find them.

To copy the Profile icons from Chrome, go to ‘%userprofile%\AppData\Local\Google\Chrome\User Data\Profile #’, where ‘#’ is profile number. Copy the ‘Google Profile.ico’ as the ‘.ico' to the 'BrowserChooser Folder'.

Copy the correct icons

Now go to the Shortcuts settings, and clone up chrome to the number of profiles.

Shortcuts dialog

Edit them manually like this:

How to set up a shortcut to a profile

To add URL patterns go to ‘Auto URLs’. With wildcards this can be very powerfull.

Auto choose browser based on url patterns

Now when you click on a configured link, it should open chrome with the right profile automaticly.

AutoURL Rules

BrowserChooser is a VB.Net application, and uses the string LIKE operator, on version 2.0.4.38373. It also removes “https://”, “http://” and “www.” from the pattern.

Special characters in pattern:

  • ? Any single character
  • * Zero or more characters
  • # Any single digit (0–9)
  • [charlist] Any single character in charlist
  • [!charlist] Any single character not in charlist

This means:

  • There is no need to use http, https, or www in the pattern.
  • ”*.” will require start of something else than “www.”.
  • Pattern “*.test.com*” will hit “http://test.test.com/” but not “http://www.test.com/”
  • Pattern “*test.com*” will hit both.
  • Pattern “*test.com*/#user/*” will not hit “http://test.com/#user/function”
  • Pattern “*test.com*/[#]user/*” will hit “http://test.com/#user/function”
  • Pattern “*” will hit everything, and must therefor be the last pattern. You can use this for selecting a default browser.

Example rules:

  • ”*test.com/*”
  • “company.sharepoint.com/*”
  • “company.visualstudio.com/*”
  • “confluence.company.com/*”
  • “localhost:19080/Explorer/”
  • “jira.company.com/*”
  • “portal.azure.com/[#]@company.com/*”

So…

Time Saved…Is Time Earned…
Work smarter, not harder…

You know… all that. :)