I was wondering how google Chrome switches between Windows 8 Mode and Windows Desktop Mode. First of all I am running Gooogle Chrome 31.0 on Windows 8.1.
Well to begin with whether it is google Chrome or Internet Explorer or they both require to be the default browser on your Windows Computer for them to be
able to run in Immersive Mode or Metro Mode or Windows-8 Mode which ever name you prefer. That is running Google Chrome and Internet Explorer in the
Windows 8 Metro Subsystem is mutually exclusive. Yes that means since Mozilla Firefox as of Firefox 26.0 has no Immersive Browser (Windows Metro Style
Browser) if you set Firefox as you default browser you will ensure that all your browsers be IE or Google Chrome or Firefox will all run in your Windows
Desktop. Basically Any Browser that needs to run in the Tile World of Windows 8 or Windows 8.1 needs to be set as default browser.
Figure 1: Launching google Chrome into Windows 8 Mode (Immersive Mode) from Chrome Desktop
Figure 2: Google Chrome needs to be default browser to run Windows 8 Mode (immservice Mode)
Now something interesting to note is that Microsoft made the unfortunate decision that all Windows 8 Metro Apps will run as the child of svhost.exe which
is generic windows Service Host Process.
Once you click on re-launch as expected you will notice in Figure 3 the process ID will change and chrome will prelaunch itself under Metro. See Figure 3.
Figure 3: Chrome.exe in Windows 8 Metro Environment runs as child of one of svchost.exe process like the rest of the Windows 8/ Windows8.1 Metro Apps
But How does really this happen? How does Google Chrome Browser running in Windows Desktop launch itself in Windows Metro?
Well see Figure 4 and how google uses an obscure Process called delegate_execute.exe which is installed under to C:\Program Files
(x86)\Google\Chrome\Application\31.0.1650.63\delegate_execute.exe to relaunch the actual Chrome Browser (chrome.exe) in desktop or Metro app. See Figure 4
on how command lines such as “--relaunch-shortcut="C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome\Google Chrome.lnk"
--wait-for-mutex=chrome.relaunch.464 --force-immersive” are used by Google’s delegate_execute.exe.
Figure 4: See how SysInternals Process Monitor shows Chrome.exe
delegate_execute.exe is launched with a command line argument “--force-immersive”. As you can see eventually new chrome.exe processes are launched and the
old chrome.exe running under desktop will be terminated.
Figure 5: Respectively see how Google Chrome.exe running under Windows Metro Mode will be terminated after delegate_execute.exe using command line argument
--force-desktop relaunches under Windows Metro Environment.
A few Interesting things to note.
· When Google Chrome Browser In Desktop Mode is not a child of explorer.exe which is normally the parent process for all UI processes
· When Google Chrome Browser Probably uses
DCOM Server Process Launcher
or some out of process COM method to create process that runs under a different windows environment.
Another interesting note. See that clicking on Google Chrome Shortcut results in actually running delegate_execute.exe.
Figure 6: running Google Chrome using the shortcut on the start menu or using pinned Shortcut on the desktop TaskBar actually runs delegate_execute.exe
which invokes chrome.exe