Google Chrome Enterprise
Introductionโ
In this example, we will build a Google Chrome Enterprise deployment which provides the following benefits over using the standard MSI based deployment:
- The ability to defer the installation up to 3 times
- The ability to close any applications that could cause errors during the installation
- Verification that the required disk space is available
- Full removal of any previous version of Google Chrome, both consumer and enterprise versions (to prevent issues sometimes seen when doing an MSI upgrade, i.e. Missing previous installation source files)
Creating the PSAppDeployToolkit deploymentโ
- Start with a fresh copy of the PSAppDeployToolkit source files.
- Download and copy the Google Chrome Enterprise MSI file in to the
Files
folder, e.g.
Script Customisationโ
Open the Deploy-Application.ps1
script and customize with the following changes:
Initializationโ
Populate these variables with the application and script details:
$appVendor = 'Google'
$appName = 'Chrome Enterprise (x64)'
$appVersion = '118.0.5993.118'
$appArch = 'x64'
$appLang = 'EN'
$appRevision = '01'
$appScriptVersion = '1.0.0'
$appScriptDate = '10/31/2023'
$appScriptAuthor = 'Dan Cunningham'
Pre-Installโ
Copy the following into the Pre-Install section:
## Prompt the user to close the following applications if they are running and
## allow the option to defer the installation up to 3 times:
Show-InstallationWelcome -CloseApps 'chrome' -AllowDefer -DeferTimes 3
## Show Progress Message (with the default message)
Show-InstallationProgress
## Remove any previous versions of Google Chrome (consumer and enterprise)
Remove-MSIApplications -Name 'Google Chrome'
Installationโ
Copy the following into the Installation section:
## Install the MSI
Execute-MSI -Action Install -Path 'googlechromestandaloneenterprisex64.msi'
Post-Installationโ
Copy the following into the Post-Install section:
## No actions required here
Uninstallationโ
Copy the following into the Uninstallation section:
## Prompt the user to close the following applications if they are running:
Show-InstallationWelcome -CloseApps 'chrome'
## Show Progress Message (with a message to indicate the application is being uninstalled)
Show-InstallationProgress -StatusMessage "Uninstalling Application $installTitle. Please Wait..."
## Remove this version of Google Chrome Enterprise
Execute-MSI -Action Uninstall -Path '{3ACBC599-F9FA-344F-A90C-4BC47885D629}'
Testing the Deployment Scriptโ
- Install the application by running the following from a Windows Powershell command prompt:
.\Deploy-Application.ps1
or
.\Deploy-Application.ps1 -DeploymentType Install
- Uninstall the application by running:
.\Deploy-Application.ps1 -DeploymentType Uninstall
Deploying through MCM using the Application Modelโ
Creating the Applicationโ
-
Copy the installation files to your application sources folder. This should be a network share accessible by yuor Microsoft Configuration Manager Primate Site.
-
Within the Configuration Manager Console, create a new Application:
- Manually specify the application information:
- Specify the Software Center entry details:
Creating the Deployment Typeโ
- Add a Deployment Type:
- Add a type of Script Installer:
-
Specify the Content Details. Ensure the content location is set correctly and tick Persist content in the client cache.
-
Enter the following for the Installation program:
Powershell.exe -File Deploy-Application.ps1
- Enter the following for the Uninstall program:
Powershell.exe -File Deploy-Application.ps1 -DeploymentType Uninstall
- For the Deployment Type Detection Method, add a Clause. Select Windows Installer and browse for the MSI file. This should populate the product code automatically:
-
For the Deployment Type User Experience, select Install for User, Installation program visibility to Normal, and select the checkbox to allow users to view and interact with the program installation.
-
Click Next on the Deployment Type Requirements page.
- Click Next on the Dependencies page.
- Click Next on the Deployment Type Summary page.
- Click Close on the Deployment Type Completion page.
- Click Next on the Deployment Type page.
- Click Next on the Application Summary page.
- Click Close on the Application Completion page.
Deploying the Applicationโ
- Right click on the Application and select Deploy:
- Select the collection to deploy to and click Next to start the deployment.
Testing the Applicationโ
- Within a few minutes, you should see the application available for install in Software Center:
-
Select Install to start the installation.
-
The installation will now start. When complete, the Status should change to Installed:
- You can use the PSAppDeployToolkit automatic logging, including the Windows Installer logs by navigating to the logs folder (default is C:\Windows\Logs\Software):