From 174381fc9c5c406e7c0c108f59dea688d752e801 Mon Sep 17 00:00:00 2001 From: Elliot Chernofsky Date: Wed, 13 Nov 2024 16:59:42 -0500 Subject: [PATCH] Set Chrome as default browser --- packages/googlechrome.vm/googlechrome.vm.nuspec | 3 ++- packages/googlechrome.vm/tools/chocolateyinstall.ps1 | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/googlechrome.vm/googlechrome.vm.nuspec b/packages/googlechrome.vm/googlechrome.vm.nuspec index 71fe31c6..c39e800c 100644 --- a/packages/googlechrome.vm/googlechrome.vm.nuspec +++ b/packages/googlechrome.vm/googlechrome.vm.nuspec @@ -2,12 +2,13 @@ googlechrome.vm - 0.0.0.20241106 + 0.0.0.20241113 Google LLC. Chrome is a popular web browser. + diff --git a/packages/googlechrome.vm/tools/chocolateyinstall.ps1 b/packages/googlechrome.vm/tools/chocolateyinstall.ps1 index 17417158..21e95636 100644 --- a/packages/googlechrome.vm/tools/chocolateyinstall.ps1 +++ b/packages/googlechrome.vm/tools/chocolateyinstall.ps1 @@ -66,5 +66,11 @@ ForEach ($hive in @("HKCU:", "HKLM:")) { Remove-Item -Path "${hive}\SOFTWARE\Classes\MSEdgeHTM" -Recurse -ErrorAction SilentlyContinue } -# Make Chrome the default for .html files -VM-Set-Open-With-Association $exePath ".html" +# Set Chrome to be the default browser +SetDefaultBrowser "chrome" + +# Do not show the "Open with" popup +Set-ItemProperty -path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -name "NoNewAppAlert" -value 1 -type "DWord" + +# Restart Explorer.exe for registry change to take effect +Stop-Process -Name explorer -Force