Friday, June 8, 2018
Packaging Google Chrome for Enterprise deployment
Packaging Google Chrome for Enterprise deployment
Many times it is an issue with the Administrators to deploy Google Chrome enterprise wide as there are lots of issues like:
1) Many people would have already installed various other versions of Chrome either through MSI or through exe.
2) How to customize Google chrome for enterprise wide deployment.
*Edited: The new version has a few differences, please see the end of post on how to tackle this.*
First, I would like to mention here that Google Chrome Enterprise version can be downloaded from the following location:
http://www.google.com/intl/en/chrome/business/browser/
This site contains an MSI, which is already customized for business as in there are no desktop/Taskbar shortcuts and the application automatically goes to Program files folder.
If you need to customize this, it is best to capture this MSI as it runs a Setup.exe from within.
I would say that, this MSI is good enough to go like this too so not recommended to waste your time in capturing the MSI unless specifically required.
You can add master_preferences file in the GoogleChromeApplication folder with following contents:
{
"homepage" : "http://msiworld.blogspot.com",
"homepage_is_newtabpage" : false,
"browser" : {
"show_home_button" : true,
"check_default_browser" : false,
"window_placement": {
"bottom": 1000,
"left": 10,
"maximized": false,
"right": 904,
"top": 10,
"work_area_bottom": 1010,
"work_area_left": 0,
"work_area_right": 1680,
"work_area_top": 0
}
},
"bookmark_bar" : {
"show_on_all_tabs" : true
},
"distribution" : {
"skip_first_run_ui" : true,
"show_welcome_page" : false,
"import_search_engine" : false,
"import_history" : false,
"create_all_shortcuts" : true,
"do_not_launch_chrome" : true,
"make_chrome_default" : false
}
}
If you add this, change the install sequence of Custom Actions which are already there in the MSI to run before InstallFiles action. That is, move InstallFiles Action after DoInstall. This will make sure your master_preferences file is retained till end.
*Edited
There are are 3 Custom Actions by the name starting from : CallUninstaller
Change their condition to REMOVE="ALL"
This will enable for a clean upgrade else you will face issues while upgrading the application.
*
Uninstall Any Previous Version of Chrome:
To Uninstall any previous version of Chrome, I have written this VBScript which can be run before the installation of your MSI.
==============================================================
Lines to get the computer Name
Const HKEY_LOCAL_MACHINE = &H80000002
Set wshShell = WScript.CreateObject( "WScript.Shell" )
strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
dim folder, MyProperties, arrMyProperties, Exe, Param, oReg, strKeyPath, strValueName
==============================================================
To check whether the OS is 32 bit or 64 bit of Windows 7
==============================================================
Lines to detect whether the OS is 32 bit or 64 bit of Windows 7
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!" & strComputerName & "" ootdefault:StdRegProv"")
strKeyPath = ""HARDWAREDESCRIPTIONSystemCentralProcessor""
strValueName = ""Identifier""
oReg.GetStringValue HKEY_LOCAL_MACHINE