Here’s a PowerShell script that tries to install Google Chrome Enterprise MSI silently, you can download the latest .MSI at Google Chrome Enterprise:
In this script, the “Main script code here” section has an example of installing Google Chrome Enterprise MSI silently. Modify the $msiPath
variable to point to the actual path of the Google Chrome Enterprise MSI file.
The Start-Process
cmdlet is used to execute msiexec.exe
with the necessary arguments (/i
for installation, /qn
for silent mode, and /norestart
to prevent automatic restarts). The -PassThru
parameter allows capturing the process information, and -NoNewWindow
ensures that the installation process runs silently without opening a new window. The -Wait
parameter ensures that the script waits for the installation to complete before proceeding.
After the installation process completes, the exit code is checked. If it is zero, indicating a successful installation, an info log message is written. Otherwise, an error message is logged and an error is thrown using the Handle-Error
function.
Remember to set the $LogFilePath
variable to the desired location for the log file.
Feel free to further customize the script as per your requirements.