Changes

Jump to: navigation, search

Google Chrome

3,983 bytes added, 15:05, 10 August 2012
Added section on automating updates for Chrome's WPKG files
just in case that doesnt work... I had changed the policy while it was stalling on the please wait... and MAKE SURE noone installed chrome on their profile... you can only see their chrome in add/remove programs on their profile
This worked for me
 
== Automated Updates of Chrome's WPKG Files ==
 
This is a VBScript we run on our WPKG server that downloads the current Chrome MSI, renames it according to the Chrome release number, and updates the package XML files accordingly. This greatly simplifies rolling out new versions of Chrome: we watch the [http://googlechromereleases.blogspot.com/atom.xml Google Chrome Releases RSS feed], and anytime we see a stable channel update, we run our VBScript. It's been working since April, for Chrome releases 18 through 21.
 
=== update-chrome.vbs ===
 
<source lang='vb'>
' update-chrome.vbs -- stored in %SOFTWARE%\google-chrome
Option Explicit
Dim objFSO, objFile, strFileProperties, objShell, strChromePath, strChromeURL
Dim strVersion, objResult, strChromeFilename, objOleFile, arrComments
Dim strTemplateFilename, ForReading, ForWriting, strText
Dim strNewText
 
strChromePath = "L:\wpkg\software\google-chrome\"
strChromeFilename = "GoogleChromeStandaloneEnterprise.msi"
strTemplateFilename = "google-chrome-template.xml"
strChromeURL = "https://dl.google.com/edgedl/chrome/install/" & _
strChromeFilename
 
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objOleFile = CreateObject("DSOFile.OleDocumentProperties")
 
objShell.CurrentDirectory = strChromePath
objResult = objShell.Run("wget --no-check-certificate " & strChromeURL, _
1, True)
If objFSO.FileExists(strChromePath & strChromeFilename) Then
' Grab version number. Requires Office installation, or DSOFile.dll
' from http://support.microsoft.com/kb/224351
objOleFile.Open(strChromePath & strChromeFilename)
arrComments = Split(objOleFile.SummaryProperties.Comments, " ", 2)
strVersion = arrComments(0)
objOleFile.Close
 
' Make a copy of the file
Set objFile = objFSO.GetFile(strChromePath & strChromeFilename)
objFile.Copy strChromePath & "GoogleChromeStandaloneEnterprise-" & _
strVersion & ".msi", True
' Delete the original file
objFile.Delete True
' Update package definitions
updateXML strTemplateFilename, _
"..\..\packages\google-chrome.xml" ' legacy tree
updateXML strTemplateFilename, _
"..\..\dev\packages\google-chrome.xml" ' dev tree
updateXML strTemplateFilename, _
"..\..\stable\packages\google-chrome.xml" ' stable tree
Else
MsgBox "Selected file does not exist!"
End If
 
Sub updateXML(strTemplateFilename, strPackageFilename)
' Update package definition
ForReading = 1
ForWriting = 2
Set objFile = objFSO.OpenTextFile(strTemplateFilename, ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "__VERSION__", strVersion)
 
Set objFile = objFSO.OpenTextFile(strPackageFilename, ForWriting)
objFile.WriteLine strNewText
objFile.Close
End Sub
</source>
 
=== google-chrome-template.xml ===
 
<source lang='xml'>
<!--
Thie file generated from %SOFTWARE%\google-chrome\update-chrome.vbs and google-chrome-template.xml
Manual edits to packages\google-chrome.xml will be overwritten.
-->
<packages>
<package
id="google-chrome"
name="Google Chrome"
revision="%version%"
reboot="false">
<variable name="version" value="__VERSION__" />
<variable architecture="x86" name="progfiles" value="%PROGRAMFILES%" />
<variable architecture="x64" name="progfiles" value="%PROGRAMFILES(X86)%" />
<check
type="uninstall"
condition="exists"
path="Google Chrome" />
<check
type="file"
condition="versionequalto"
path="%progfiles%\Google\Chrome\Application\chrome.exe"
value="%version%" />
<install cmd="taskkill /F /IM chrome.exe">
<exit code="any" />
</install>
<install cmd='msiexec /qn /norestart /i "%SOFTWARE%\google-chrome\GoogleChromeStandaloneEnterprise-%version%.msi"' />
<upgrade include='install' />
<remove cmd="taskkill /F /IM chrome.exe">
<exit code="any" />
</remove>
<remove cmd='msiexec /qn /x {54DF35BD-4A36-35DA-B029-A0C083C88614}' />
</package>
</packages>
 
</source>
 
--[[User:Mwr|Mwr]] 17:05, 10 August 2012 (CEST)
== Google Chrome 18 ==
4
edits

Navigation menu