mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
Switch Brave for Windows installer back to ensure existing install script works (#28331)
This commit is contained in:
parent
013af432fa
commit
8ac041d6db
1 changed files with 3 additions and 3 deletions
|
|
@ -5,14 +5,14 @@
|
|||
"queries": {
|
||||
"exists": "SELECT 1 FROM programs WHERE name = 'Brave' AND publisher = 'Brave Software Inc';"
|
||||
},
|
||||
"installer_url": "https://github.com/brave/brave-browser/releases/download/v1.77.97/BraveBrowserStandaloneSilentSetup.exe",
|
||||
"installer_url": "https://updates-cdn.bravesoftware.com/build/Brave-Release/x64-rel/win/135.1.77.97/brave_installer-x64.exe",
|
||||
"install_script_ref": "0319c426",
|
||||
"uninstall_script_ref": "da8237ee",
|
||||
"sha256": "61a4ab69719c7d9bae554c218f33d7c09657c1ef33891849c15e978a60798ff8"
|
||||
"sha256": "284f27ad9448634efc4f0f7b418501f0c77b5eab8ab0138da34034a9989706ff"
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"0319c426": "# Learn more about .exe install scripts:\n# http://fleetdm.com/learn-more-about/exe-install-scripts\n\n$exeFilePath = \"${env:INSTALLER_PATH}\"\n\ntry {\n\n# Add argument to install silently\n# Argument to make install silent depends on installer,\n# each installer might use different argument (usually it's \"/S\" or \"/s\")\n$processOptions = @{\n FilePath = \"$exeFilePath\"\n ArgumentList = \"--do-not-launch-chrome --system-level\"\n PassThru = $true\n Wait = $true\n}\n \n# Start process and track exit code\n$process = Start-Process @processOptions\n$exitCode = $process.ExitCode\n\n# Prints the exit code\nWrite-Host \"Install exit code: $exitCode\"\nExit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n",
|
||||
"da8237ee": "# Define acceptable/expected exit codes\n$ExpectedExitCodes = @(0, 19)\n\n# Uninstall Registry Key\n$machineKey = 'HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\BraveSoftware Brave-Browser'\n\n# Additional uninstall args\n$uninstallArgs = \"--force-uninstall\"\n\n# Initialize exit code\n$exitCode = 0\n\ntry {\n $key = Get-ItemProperty -Path $machineKey -ErrorAction Stop\n\n # Get the uninstall command. Some uninstallers do not include 'QuietUninstallString'\n $uninstallCommand = if ($key.QuietUninstallString) {\n $key.QuietUninstallString\n } else {\n $key.UninstallString\n }\n\n # The uninstall command may contain command and args, like:\n # \"C:\\Program Files\\Software\\uninstall.exe\" --uninstall --silent\n # Split the command and args\n $splitArgs = $uninstallCommand.Split('\"')\n if ($splitArgs.Length -gt 1) {\n if ($splitArgs.Length -eq 3) {\n $uninstallArgs = \"$( $splitArgs[2] ) $uninstallArgs\".Trim()\n } elseif ($splitArgs.Length -gt 3) {\n Throw \"Uninstall command contains multiple quoted strings. Please update the uninstall script.`nUninstall command: $uninstallCommand\"\n }\n $uninstallCommand = $splitArgs[1]\n }\n\n Write-Host \"Uninstall command: $uninstallCommand\"\n Write-Host \"Uninstall args: $uninstallArgs\"\n\n $processOptions = @{\n FilePath = $uninstallCommand\n PassThru = $true\n Wait = $true\n }\n if ($uninstallArgs -ne '') {\n $processOptions.ArgumentList = \"$uninstallArgs\"\n }\n\n # Start uninstall process\n $process = Start-Process @processOptions\n $exitCode = $process.ExitCode\n Write-Host \"Uninstall exit code: $exitCode\"\n\n} catch {\n Write-Host \"Error: $_\"\n $exitCode = 1\n}\n\n# Treat acceptable exit codes as success\nif ($ExpectedExitCodes -contains $exitCode) {\n Exit 0\n} else {\n Exit $exitCode\n}\n"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue