Forum Discussion
Brave Browser Intune Deploy
This method is robust because it properly waits for the entire installation to complete before telling the management system that it's finished.
Step 1: Download the Correct Brave Installer
First, ensure you are using the Brave for Business (Enterprise) offline installer. Do not use the standard online "stub" installer, as it's not designed for silent deployment.
- Go to the Brave for Business GitHub repository: https://github.com/brave/brave-browser/releases
- Find the latest release version.
- Download the correct offline installer for your architecture, likely BraveBrowserStandaloneEnterpriseX64.exe.
Step 2: Create the PowerShell Installation Script
Create a new text file and name it Install-Brave.ps1. Copy and paste the following code into it. This script will handle the silent installation and logging.
# Install-Brave.ps1
# --- Script Configuration ---
$InstallerName = "BraveBrowserStandaloneEnterpriseX64.exe"
$LogFile = "C:\Windows\Temp\Brave_Install.log"
# --- Helper Function for Logging ---
function Write-Log {
param (
[string]$LogString
)
$Stamp = (Get-Date).toString("yyyy-MM-dd HH:mm:ss")
$LogMessage = "$Stamp - $LogString"
Add-content -Path $LogFile -Value $LogMessage
}
# --- Main Script Logic ---
try {
Write-Log "Starting Brave Browser installation script."
# Get the directory where the script is running from
$PSScriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Definition
$InstallerPath = Join-Path $PSScriptRoot $InstallerName
Write-Log "Installer path resolved to: $InstallerPath"
if (-not (Test-Path $InstallerPath)) {
Write-Log "ERROR: Installer file not found at '$InstallerPath'. Exiting."
Exit 1
}
# The correct silent install arguments for Brave Enterprise
$Arguments = "--silent --install"
Write-Log "Executing command: $InstallerPath $Arguments"
# Use Start-Process and -Wait to ensure the script waits for the entire installation to finish
# This is the key to avoiding the timeout error (0x87D300C9)
$Process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru -ErrorAction Stop
# Check the exit code of the process
$ExitCode = $Process.ExitCode
Write-Log "Brave installer process finished with Exit Code: $ExitCode"
if ($ExitCode -ne 0) {
Write-Log "ERROR: Installation failed with a non-zero exit code."
Exit $ExitCode
} else {
Write-Log "Installation completed successfully."
Exit 0
}
}
catch {
Write-Log "FATAL ERROR: An unexpected error occurred in the script."
Write-Log $_.Exception.Message
Exit 1
}
Step 3: Package the Application for Intune (Win32 App)
You will now package these files into a single .intunewin file.
- Create a folder (e.g., C:\BravePackage).
- Inside this folder, create two subfolders: Source and Output.
- Place both BraveBrowserStandaloneEnterpriseX64.exe and Install-Brave.ps1 into the Source folder.
- Download and run the Microsoft Win32 Content Prep Tool.
- When prompted:
- Source folder: C:\BravePackage\Source
- Setup file: Install-Brave.ps1
- Output folder: C:\BravePackage\Output
- Specify catalog folder? No
This will create an Install-Brave.intunewin file in your Output folder.
Step 4: Create the Application in Microsoft Intune
- In the Intune portal, go to Apps > Windows > Add and select Windows app (Win32).
- Upload the Install-Brave.intunewin file you just created.
- Program Settings:
- Install command: powershell.exe -ExecutionPolicy Bypass -File .\Install-Brave.ps1
- Uninstall command: "C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe" --uninstall --system-level --force-uninstall
- Install behavior: System
- Detection Rules:
- Rules format: Manually configure detection rules
- Rule type: File
- Path: C:\Program Files\BraveSoftware\Brave-Browser\Application
- File or folder: brave.exe
- Detection method: File or folder exists
- This is a simple and reliable detection method. You can also use "Version" if you need to be more specific.
- Assignments: Assign the app to your desired user or device groups.
I did not find the enterprise package, so I downloaded the Standalone Silent setup executable and followed the rest of your steps. Modified the script to call the standalone silent setup exe. Deployed everything as the guide suggests and monitored. Unfortunatly the same errors as before are being displayed. Now I increased the installation time required to 90min instead of 60 and repackaged the intunewin file using the latest version of the Microsoft Win32 Content Prep Tool. Will monitor the installations again and revert.