Skip to content

Commit

Permalink
Set Chrome as default browser
Browse files Browse the repository at this point in the history
  • Loading branch information
emtuls committed Nov 25, 2024
1 parent 7124eb4 commit 174381f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/googlechrome.vm/googlechrome.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>googlechrome.vm</id>
<version>0.0.0.20241106</version>
<version>0.0.0.20241113</version>
<authors>Google LLC.</authors>
<description>Chrome is a popular web browser.</description>
<dependencies>
<dependency id="common.vm" version="0.0.0.20241106" />
<dependency id="vcbuildtools.vm" />
<dependency id="setdefaultbrowser" />
</dependencies>
</metadata>
</package>
10 changes: 8 additions & 2 deletions packages/googlechrome.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 174381f

Please sign in to comment.