Sunday, June 03, 2012

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 Google\Chrome\Application 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 & "\root\default:StdRegProv")
   strKeyPath = "HARDWARE\DESCRIPTION\System\CentralProcessor\0"
   strValueName = "Identifier"

 oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
'==============================================================
'Checking Condition whether the build is 64bit or 32 bit
   if (instr(strValue,"64")) then
 folder = "C:\Program Files (x86)\Google\Chrome"
 RegVal = ReadReg ("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome\UninstallString")
 End If
if (instr(strValue,"x86")) then
 folder = "C:\Program Files\Google\Chrome"
 RegVal = ReadReg ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome\UninstallString")
End If
'==============================================================

MyProperties = RegVal
arrMyProperties = Split(MyProperties, "-")
Exe = arrMyProperties(0)
Param = "--uninstall --multi-install --chrome --system-level --force-uninstall"
'Uninstall Previous version Chrome
'==============================================================
wshShell.run Exe & Param, 1, True
'Delete leftover folder and files from Previous version Chrome
'==============================================================
dim filesys
Set filesys = CreateObject("Scripting.FileSystemObject")
If filesys.FolderExists(folder & "\") Then 
   filesys.DeleteFolder folder
End If
Function ReadReg(RegPath)
      Dim objRegistry, Key
      Set objRegistry = CreateObject("Wscript.shell")
      Key = objRegistry.RegRead(RegPath)
      ReadReg = Key
 End Function


Hope these steps will reduce your efforts in deployment of Chrome.

*
With the New version 26.0.1410.64, Google has changed the install sequence. do the following:

1) In InstallExecuteSequence Table move InstallFiles action after DoInstall Custom Action. This DoInstall Custom Action is actually installing the Google Chrome from an exe. So if the MSI already had copied the master_preferences file, this exe will replace it with its own. If you place the InstallFile Action after DoInstall, then the file which you have added in your package will overwrite the one which Google provides.
2) You might have to write a small script to delete the shortcut from C:\Users\Public\Desktop, if you do not want a desktop shortcut.
Place this CA at the end just before InstallFinalize.

77 comments:

Anonymous said...

Thanks to you Sir

Stan Hampton said...

How can I install Chrome as the default browser?

Piyush Nasa said...

Make this setting as true:
"make_chrome_default" : false

Srinivas Neyigapula said...

Very Helpful..But not used all the customizations mentioned above.

Disable updates for latest version of Chrome.
2.Set the value of HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update\AutoUpdateCheckPeriodMinutes to the REG_DWORD value of "0".

Please refer the following URl for more information.
http://dev.chromium.org/administrators/turning-off-auto-updates

Piyush Nasa said...

That is correct. You can add this to disable the autoupdate.
We did want Autoupdate to be enabled so that it is patched and we do not have to upgrade it.
Chrome Autoupdates itself even if the users do not have admin privileges.

Anonymous said...

Can you elaborate on your section about following custom actions.

quote
"There are are 3 Custom Actions by the name starting with : CallUninstaller
Change their condition to REMOVE="ALL"
This will enable for a clean upgrade else you will face issues while upgrading the application."

Currently the installer is set to - 'REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE"'

Don't we want this to be set to - '"REMOVE="ALL" AND UPGRADINGPRODUCTCODE"' or maybe this '"REMOVE="ALL" OR UPGRADINGPRODUCTCODE"'

We want to uninstall through Add/Remove programs and uninstall during upgrade, correct?

Piyush Nasa said...

This is for future products when you install on top of this one you are creating. Not to handle any previous releases.
The quote you mentioned will make sure that when this product is uninstalled by an upgrade code of newer version then it will be a clean uninstall.
you do not need to uninstall from Add/Remove Programs, if you add an upgrade code, it will do the task for you.

JPatton said...

Hey, I am working on deploying google chrome in an enterprise environmetn using the given .msi accompanied by a generated .mst following your instruction. For the most part I understand how this works but I was just wondering if there is a way to incorporate the master_preferences file into this task. We need to change a few things from the default .msi and I'm not exactly sure what I need to put in the conditions to achieve the proper deployment. Thanks

Piyush Nasa said...

Are you using any packaging tool like WISE or Installshield to create the MST? If yes, then you can add the master_preferences file in your MST and it will be added when you install the application.

David K said...

I am having trouble understanding your script for uinstalling. I try to run it and nothing happens. Any thoughts?

Piyush Nasa said...

If any previous version of Chrome is installed through an msi then its uninstall will be taken care by msi through upgrade table, but if it is installed through exe then it creates an uninstall string in HKLM always at a particular key. So I have used that key to uninstall chrome of any previous version.

MattHarrington said...

Thank you.

There is an error in your script though as both folder paths are pointing to Program files (x86).

The 64 bit should be Program Files.

-AR said...

This is awesome, THANKS!!!

However I am having trouble with it and wondered if anyone can assist as this is my first MSI manipulation to this degree. I intend to roll out via SCCM 2012.

I used Admin Studio 11.5 SP1 InstallShield (Spring 2012) to edit a copy of the enterprise MSI. Under "Behavior and Logic", "Custom Actions and Sequences", "Sequences", "Installation", "Execute", I drag & dropped "InstallFiles" to just beneath "DoInstall".

I then changed all (3) "CallUninstaller" actions at this location to reflect the proposed changes.

At this point I am confused as to how to handle the master_preferences file. I am not sure if I should follow up install with an xcopy command that takes care of the copy, or if I should include it in the MSI.

I would prefer to have it happen in one smooth shot, so I took the additional step under "Application Data", "Files and Folders", and under the "Destination computer's files" added my master-preferences file, both as an uncompressed file and then afterward, also streamed into the CAB. After adding the file, I went to "Organization", "Components", "AllOtherFiles", and simply changed the shared value from "yes" to "no".

Before attempting to compare the source and modded MSIs to create and apply the transform, which is how I intend to do it, I first just ran each modified MSI with logging and neither placed my modified master_preferences file. With both installs, I had only the default master prefs. I'm not sure if "TARGETDIR" is the correct path to use, but either way it doesn't seem to be placing it anywhere on the system. I ran the installs via command line by "opening command window here" on the source directory, hence the drive letter assignment.

Here is what I see in the log for the uncompressed master prefs:

-----------------------------------
MSI (s) (18:D8) [12:35:12:116]: Executing op: ActionStart(Name=InstallFiles,Description=Copying new files,Template=File: [1], Directory: [9], Size: [6])
MSI (s) (18:D8) [12:35:12:131]: Executing op: ProgressTotal(Total=669,Type=0,ByteEquivalent=1)
MSI (s) (18:D8) [12:35:12:131]: Executing op: SetTargetFolder(Folder=Q:\)
MSI (s) (18:D8) [12:35:12:147]: Executing op: SetSourceFolder(Folder=1\)
MSI (s) (18:D8) [12:35:12:147]: Executing op: ChangeMedia(,MediaPrompt=Please insert the disk: ,,BytesPerTick=65536,CopierType=0,,,,,,IsFirstPhysicalMedia=1)
MSI (s) (18:D8) [12:35:12:147]: Executing op: ChangeMedia(,MediaPrompt=Please insert the disk: ,,BytesPerTick=65536,CopierType=0,,,,,,IsFirstPhysicalMedia=1)
MSI (s) (18:D8) [12:35:12:147]: Executing op: FileCopy(SourceName=MASTER~1|master_preferences,SourceCabKey=master_preferences,DestName=master_preferences,Attributes=8192,FileSize=669,PerTick=65536,,VerifyMedia=1,,,,,CheckCRC=0,,,InstallMode=58982400,HashOptions=0,HashPart1=733544584,HashPart2=-866498541,HashPart3=-879329803,HashPart4=1571013234,,)
MSI (s) (18:D8) [12:35:12:241]: File: Q:\master_preferences; To be installed; Won't patch; No existing file
MSI (s) (18:D8) [12:35:12:256]: Source for file 'master_preferences' is uncompressed, at 'Y:\Applications\Google\Chrome_24.0.1312.52\2\'.
MSI (s) (18:D8) [12:35:12:584]: Executing op: CacheSizeFlush(,)
-----------------------------------

-AR said...

...and here is the streamed CAB log:

-----------------------------------
MSI (s) (AC:C8) [12:16:57:487]: Executing op: ActionStart(Name=InstallFiles,Description=Copying new files,Template=File: [1], Directory: [9], Size: [6])
MSI (s) (AC:C8) [12:16:57:675]: Executing op: ProgressTotal(Total=669,Type=0,ByteEquivalent=1)
MSI (s) (AC:C8) [12:16:57:690]: Executing op: SetTargetFolder(Folder=Q:\)
MSI (s) (AC:C8) [12:16:57:690]: Executing op: SetSourceFolder(Folder=1\)
MSI (s) (AC:C8) [12:16:57:690]: Executing op: ChangeMedia(,MediaPrompt=Please insert the disk: ,,BytesPerTick=65536,CopierType=0,,,,,,IsFirstPhysicalMedia=1)
MSI (s) (AC:C8) [12:16:57:690]: Executing op: ChangeMedia(,MediaPrompt=Please insert the disk: ,MediaCabinet=Data1.cab,BytesPerTick=65536,CopierType=2,ModuleFileName=C:\Windows\Installer\8d4dd.msi,,,,,IsFirstPhysicalMedia=1)
MSI (s) (AC:C8) [12:16:57:690]: Executing op: FileCopy(SourceName=MASTER~2|master_preferences,SourceCabKey=master_preferences,DestName=master_preferences,Attributes=16384,FileSize=669,PerTick=65536,,VerifyMedia=1,,,,,CheckCRC=0,,,InstallMode=58982400,HashOptions=0,HashPart1=733544584,HashPart2=-866498541,HashPart3=-879329803,HashPart4=1571013234,,)
MSI (s) (AC:C8) [12:16:57:768]: File: Q:\master_preferences; To be installed; Won't patch; No existing file
MSI (s) (AC:C8) [12:16:57:831]: Source for file 'master_preferences' is compressed
MSI (s) (AC:C8) [12:16:58:003]: Executing op: CacheSizeFlush(,)
-----------------------------------

The only other concern at this point is it doesn't seem to lay down a shortcut in the Start Menu. I don't want a desktop shortcut, or anything pinned. Installing as elevated user I only seem to get a per user desktop shortcut.

Thanks in advance for any assistance!!!

Anonymous said...

Thanks for your help, great blog!

After uninstall of chrome we have the issue that the folder CrashReports will not be deleted.
Do you have any idea about to solve this?

Anonymous said...

I see the current MSI ver of the install (65.x) does not create the start menu shortcuts any longer. Is there a trick to running the MSI and having it add the start menu shortcuts. Like a Public Property on the command line?

Piyush Nasa said...

Hi AR,
I am not sure why are you making it so complicated. You can open the MSI you have downloaded and save it as an MST. This will create an MST file. you can go to files section and add the master_preferences file there and save the MST. It will do everything for you.
For changing the install sequence, i would suggest you to do it from InstallExecuteSequence table. Sort it with the sequence and change the sequence number as you want it to install.
For shortcut, go to Shortcut section and change the shortcut install location there.
Let me know if you face any more issue.

Piyush Nasa said...

Crash reports folder is not deleted because it is not part of the initial install you will have to write a script to delete it or add it into RemoveFile table to delete it at uninstall.

Piyush Nasa said...

You can edit your MSI to install the shortcut in Start Menu.

Piyush Nasa said...

Thanks Matt for your input.. Have fixed the script now.

Anonymous said...

Thanks for the reply Piyush. My issue, due to inexperience with InstallShield, is I can't get it to accept the %ProgramFiles% variable as it won't place the file at all unless I specify either "Program Files" or "Program Files (x86)" requiring two separate installers.

Also, if I have a local Q: drive for App-V, it will always place the file there instead of C:.

I have opened an incident with Flexera that has been escalated and they have been working on it for over 2 weeks, so maybe there is something to it...not sure.

Piyush Nasa said...

You can have it in two different components in the same MSI.
could you also write some more on your issue. also please give a name or any symbol so I understand and relate issues. there are just so many Anonymous.

Cheers,
Piyush

Anonymous said...

Sorry, I meant to add my initials as I did in my previous posts, but forgot to in my last reply. Here are the details that I sent to Flexera:

"Basically I am wanting to add a master_preferences file (no extension) to a Google Chrome enterprise MSI, then create a transform by comparing the modified and original MSIs. I have figured out how to add directories and components to the project via direct editor and in the files and folders section. (streaming it into the MSI's cab) However I am seeing two problems with this. The first one is with our Q: drive for App-V deployments. Typically this drive cannot be browsed by the end user, but in my VMs (test environment) it can be browsed. As long as it is accessible, my modified MSI will place the directories and components in the Q: drive rather than drive C:. Not a big deal, except I want to understand why this is.

The path looks like this: Destination computer\[INSTALLDIR]\Program Files\Google\Chrome\Application\(AllOtherFiles)master_preferences

I also don't quite understand how [TARGETDIR] plays into things, as when I try to use it instead of [INSTALLDIR], none of my additional directories / components gets copied.

Secondly, if I set Q: to offline, then it will install to the C: drive as expected, however I can not get it to run if I use the %ProgramFiles% variable to support both x86 and x64 clients. I could call up the appropriate architecture specific MSI in a batch file, or have two separate deployments in SCCM 2012 with processor requirements, but I would much prefer to utilize my resources to do this in the MSI if at all possible.

So far, I have only tested by calling the modified MSI, but eventually I wish to call the original MSI and apply my transform to it."

Are you saying that I should add two components to the project, one to "Program Files" and one to "Program Files (x86)"? I just want to know the best practice. Thanks again Piyush.

-AR

Piyush Nasa said...

Are you creating MSI/MST or App-V.. Please clarify..
I am in the process of responding and need some more clarity..

Anonymous said...

MSI+MST, or at least MSI to start with. I haven't yet dug into App-V as we're slowly moving away from them.

-AR

Piyush Nasa said...

For MSI and MST, If you follow step by step what I have written then it should not be a problem. Do not go into x64 or x86 because it will install fine on both. Keep your INSTALLDIR to Chrome folder..

Jane Frasier said...

This sounds so easy, ("you can go to files section and add the master_preferences file there and save the MST") but I am using Orca to create the .mst and there are no rows in the table now and am unsure what all I need to include. Is this the only change besides the sequence in the .mst?

Thanks.

Jane

Piyush Nasa said...

If you are using ORCA then I would rather suggest you to script and copy file stuff. Rest all modifications you can do in ORCA and create MST.

Jane Frasier said...

Can bookmarks be added somehow to this enterprise deployment? I want all users to share the same ones.

Thanks.
Jane

Piyush Nasa said...

There is a bookmarks file in chrome at this location:
C:\Users\USERNAME\AppData\Local\Google\Chrome\User Data\Default
You need to add bookmarks to your clean machine and then copy this file to all users at this location. The USERNAME will be different for all so might be you can use Active Setup and a script.

Anonymous said...

I finally figured out how to add the master_prefs file to the MSI. After adding the file, I was changing the path from the files & folders area and not the setup design or components area. Also, I was trying to use "Program Files\Google\Chrome\Application" as a destination, or even trying to use the %ProgramFiles% variable. To properly add the file the path needs to be "[ProgramFilesFolder]\Google\Chrome\Application". You are supposed to use the pre-defined property names as found here: http://kb.flexerasoftware.com/selfservice/viewContent.do?externalID=Q105880

Then you can also define the new directories, as is best practice, from Directory_1, Directory_2, etc. to GOOGLE, CHROME, APPLICATION, etc.

-AR

Michael Linde said...

Hi there. Just want to be sure that when using the master_preferences file in an enterprise install (following an uninstall with your script) that it actually works. I've place a sample master_preferences file in the location after running the install, and it does not seem to reference it (this is on a machine that had Chrome before uninstalling). I tested by changing the home page, and it still comes up with the Chrome default home page.

M.Linde said...

Do you know if you set the experimental flags in the master_preferences file?

Piyush Nasa said...

Yes, it should work. The uninstall script deletes any folder of previous version and the MSI will create a new Chrome folder and will reference the master_preferences file in there.
In your case can you check if the install is referring from %appdata%. As chrome could have been installed there as well.
And could you please explain experimental flags.. I mean what exactly you mean by it.

M.Linde said...

Experimental flags can be accessed live via chrome://flags (this lets you list and modify the experimental flags/setting).

You can also open the app activating an experimental flag by changing the target of the icon to include the command string for the flag. All of this is great for one-off deployments, but I need to deploy 100 seats of Chrome with an experimental flag enabled and was hoping it could be set in the master_preference file.

Thanks!

M.Linde said...

I don't see a Googel/Chrome/Application folder in %appdata%, either.

Thanks!

Piyush Nasa said...

Two things:
1) Can you confirm that had you launched Chrome after installing and before copying master_preferences file.
2) can you open and see if the file changed after launching chrome.

Anonymous said...

master preferences no longer works on latest enterprise edition

Piyush Nasa said...

I think, it still works.
Have a look at this latest document updated on 22 April 2013 from Google:
https://docs.google.com/document/d/1iu6I0MhyrvyS5h5re5ai8RSVO2sYx2gWI4Zk4Tp6fgc/edit

Anonymous said...

Try it. The master_preferences file is completely ignored. copied the template file and followed the instructions (path) and it simply does not work. Instructions here: http://support.google.com/chrome/a/bin/answer.py?hl=en&answer=187948

Piyush Nasa said...

Ok, so here is the thing with the latest version. I just did it myself and I will edit my post as well.
With the New version 26.0.1410.64, Google has changed the install sequence. do the follwing:

1) In InstallExecuteSequence Table move InstallFiles action after DoInstall Custom Action. This DoInstall Custom Action is actually installing the Google Chrome from an exe. So if the MSI already had copied the master_preferences file, this exe will replace it with its own. If you place the InstallFile Action after DoInstall, then the file which you have added in your package will overwrite the one which Google provides.
2) You might have to write a small script to delete the shortcut from C:\Users\Public\Desktop, if you do not want a desktop shortcut.
Place this CA at the end just before InstallFinalize.

Hope this will help you and thanks for getting me do this. :)

Anonymous said...

Is there no way just to copy the master_preferences file into the folder after the install (before opening Chrome)? I assumed an new user on the PC would then use that file, is this not correct? Appreciate the help.

Piyush Nasa said...

You can wrap this MSI in a vbscript and copy it outside from msi through VBScript or any other scripting method.

Anonymous said...

Thats the bit that does not work for me. I Install Chrome, copy master_preferences file (via script) into the Chrome.exe folder. Its there, I confirmed it. Any new user that gets added to the PC should use that file on first run, but non of the settings are applied. Its simply ignored. I was trying not top hack the MSI, am I missing something?

Piyush Nasa said...

See there is the problem. You are not following my blog post. You don't need to copy it to chrome.exe folder but in Application folder. Read my post again.

Anonymous said...

I have read your blog and the offical pages. The offical http://support.google.com/chrome/a/bin/answer.py?hl=en&answer=187948 document. Bullet point 2 which states same folder as Chome.exe

Your blog says "Google\Chome\Application". The offical docs say "C:\Program Files\Google\Chrome\Application". Both of which ARE where chrome.exe sits on my PC. Chrome_launcher.exe is in a subfolder called "26.0.1410.64" along with numerous other files.

Dont worry about it, appreciate the help anyway.

Anonymous said...

Sorry, think this will make it clearer.

https://imageshack.us/scaled/large/585/chromej.jpg

Chrome.exe gets installed in the folder where you state when I use googles MSI. I am 64 bit Windows 7.

Anonymous said...

hi m new to packaging team ,
m assigned wid google chrome msi in which i hav to set home page url which is provided by my company n i hav to enable n disable following properties :
PasswordManagerEnabled - enabled
RestoreOnStartup - disable
EnableOnlineRevocationChecks -disable

these are d changes tat i wan to make it through mst

Piyush Nasa said...

what is the issue that you are facing?

Kenady Inampudi said...

Hi,
Could you suggest me..how to suppress the google sign in tab in chrome...so that i can stop sync in chrome.....
Reason: i have changed the master_prefernce file so that i could set WWW.*****.com as home page.....but after install, when i launch chrome..first tab comes up to sign in and in the next tab my home page opens...i want to supress the sign in page

Piyush Nasa said...

Try by adding this in the master_preferences file:

"sync_promo" : {
"user_skipped" : true
}


-Just like distribution, homepage, bookmark_bar, this is the next section.

Hope it helps. Please post if it has worked for you.

Anonymous said...

hi am new to packaging
i followed ur steps but when i open the crome i cannot see the default browser i set in prefrence file
FYI prefrence file is sucessfully replaced to /crome/application

please hurry i have only one day

Piyush Nasa said...

Boss, I am happy to help and guide you but not obligated to hurry and give you a response. You need to understand that this blog is not for solving individual problems as a P1 urgency..
Anyways, I would suggest you to make your homepage manually in your browser and see if there is a difference in the master_prferences file. If there is then use that preferences file.

Anonymous said...

Hi Piyush,

Thansk for a lovely post.
However, I am new to Packaging and din understand how to change the custom actions for 3 calluninstaller things to remove all and how to do a customa action to delete the shortcut fromt he desktop and also the sequence change.
I am using Wise and have create a MST but just need to do the following modificaitons.
can you please elaborate.

Piyush Nasa said...

Go to Tables in WISE and then to InstallExecuteSequence table. Sort the actions with Sequence number.
You will see 3 actions there which would be starting with CallUninstaller, add the condition to them as I have suggested.
Sequence change you can do by just changing the sequence number in the above mentioned table.
Search for a vbscript to delete file and you can use that script as a Custom Action. Use CallVBScript from embedded code custom action.

Anonymous said...

when using the uninstall VBS it works perfect if i run it locally. However, when i remotely execute it on a pc it removes chrome but it leaves the pinned icon in the toolbar. when you click on the icon in the toolbar it asks if you want to delete it.

any reason why this happens.

Ram said...

Awesome,
can you help me,
I am trying to add if condition, to check whether chrome is installed or not, if yes, it should uninstall, coz script is giving an error it chrome is not installed,

Piyush Nasa said...

I am checking the existance of chrome in the script through registry. check if that registry is present in your machine where chrome is installed or not.
You can change that part in the script according to your needs.
Hope it helps.

Piyush Nasa said...

Regarding the pinned icon in the toolbar, since it was not part of the initial install it will not be deleted. You will need to script it to uninstall it.

srikanth said...

Hi can anyone tell me how to remove desktop and taskbar shortcut...I am edited master_preferences till also my package is installing desktop and taskbar shortcuts ????
It's very urgent issue some one help me to find it out ?????

Piyush Nasa said...

I have mentioned in the end of my post that you will need to write a script to delete the shortcuts. There is no other way. You can run this script before install finalize action.

C. Welch said...

Hi Piyush, I was fiddling with the Chrome package for version 34.0.1847.131. I am having an issue finding that registry key to disable autoupdates as posted. I am thinking I have to create that key and I'll give that a try, but it doesn't seem to be there after the Enterprise install. BTW - thanks for this thread. The package is almost there.

Piyush Nasa said...

I have not checked the latest version.. However try this:

Disable updates for Chrome.
Set the value of HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update\AutoUpdateCheckPeriodMinutes to the REG_DWORD value of "0".

Anonymous said...

Hi Piyush,
I am working to build a install script(vbs or batch) that installs chrome and sets a custom url, something like https://prod.ge.com as a default homepage.. also install the extension legacy browser support? can you help me how we achieve that?

Piyush Nasa said...

In master_prefrences file, change the homepage to what you want. I have mentioned it as my website. You can change it to yours.
what type of extension is it. Can you capture it and add to your MSI through MST?

bibin said...

Hi

I am gettting the below error when i install MSI file using sccm.

Few machine accepting the installer without error . few machine not installing the msi.

Product: Google Chrome -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action DoInstall, location: C:\Windows\Installer\MSID933.tmp, command: /silent /install "appguid={8A69D345-D564-463c-AFF1-A69D9E530F96}&appname=Google Chrome&needsAdmin=True&brand=GGRV" /installsource enterprisemsi /appargs "appguid={8A69D345-D564-463c-AFF1-A69D9E530F96}&installerdata=%7B%22distribution%22%3A%7B%22msi%22%3Atrue%2C%22system_level%22%3Atrue%2C%22verbose_logging%22%3Atrue%7D%7D"

Piyush Nasa said...

This error occurs when the previous version of Chrome is not removed correctly and you will need manual intervention here to remove that first and then install the newer one.

Dennis said...

I'm trying to improve my Chef cookbook recipe that installs Chrome on Windows. I need to know during provisioning of a server, what version of Chrome would be installed. Is there a way to do this? I tried to use the registry, but it is not available during installation. It also looks like I'm installing only 32 bit version. Do you know a url to a 64bit version? The cookbook can be found here: https://github.com/dhoer/chef-chrome. Any help to make this cookbook better would be awesome.

Piyush Nasa said...

Hi Dennis,

I never allow comments which have links to other sites, but I must say that you are doing an awesome job so had to post your comment. But really sorry to say that I cannot help you much on what you have asked for. But I keep it in this forum if someone else reads it and can answer this.

Cheers,
Piyush

Nicole Curtis said...
This comment has been removed by a blog administrator.
chaitanya said...

Hi Piyush I am packaging Google chrome 38.0.2125.11 enterprise edition i.e an MSI which i have downloaded. I have requirement to disable the option of adding the users i.e setting --> users--> This tab should be completely disabled for me , Let me know any suggestions to achieve this

Justin said...

You can reapply the master_preferences by removing the following file from the user's profile.

%UserProfile%\AppData\Google\Chrome\UserData\First Run

When you restart Chrome the settings will be applied.

N74JW said...

Mileage may vary with the uninstall VBS script. Current Enterprise versions of Google Chrome don't install to those paths in the registry.

Petr Šanda said...

Hi, I have a script for uninstalling any application which relies on reading and executing the Uninstallstring from registry. It works for HKLM, HKCU and HKU. It loops through all users and is looking for user installed applications and tries to remove them. For case of google chrome user based installation, I am facing errors 15 & 19. Looks like I cannot uninstall the app from different context than the user's who initially installed it. I am looking to uninstall it from the SYSTEM context as my agent will do the trick. There is not much written about it on the internet since everyone omits this eventuality, so I was wondering if you would know.

I need to uninstall all userbased chromes from %userprofile% and install an enterprise version which will go to %Programfiles%.

Thanks for any useful help.

Petr
Enterprise admin @ bigcompany

Piyush Nasa said...

Hi Petr,
Did you try active setup?
Copy the script somewhere in the system drive which is accessible by all users and then create Active Setup key, which will run your uninstall script in user context when the user logs off and logs back in.
Cheers,
Piyush

Petr Šanda said...

Haven't tried this yet, however, it looks to me there is nothing else I could do (apart of variety of options on this particular method).
I was really hoping I could remove it while running in SYSTEM context.
Are you sure it cannot be done ?

Piyush Nasa said...

IF the script above has not worked for you then it means that it needs to be uninstalled from user profile and Active Setup is the best way for it.