Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Chrome as default browser #1164

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,13 +2,14 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>googlechrome.vm</id>
<version>0.0.0.20241122</version>
<version>0.0.0.20241212</version>
<authors>Google LLC.</authors>
<description>Chrome is a popular web browser.</description>
<dependencies>
<dependency id="common.vm" version="0.0.0.20241106" />
<!-- vcbuildtools.vm installs signtool.exe needed by VM-Assert-Signature -->
<dependency id="vcbuildtools.vm" />
Ana06 marked this conversation as resolved.
Show resolved Hide resolved
<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
Loading