Skip to content

Commit

Permalink
Make Chrome the Default for .html
Browse files Browse the repository at this point in the history
  • Loading branch information
emtuls committed Apr 26, 2024
1 parent 6f799eb commit cd5cabb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/googlechrome.vm/googlechrome.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>googlechrome.vm</id>
<version>0.0.0.20240405</version>
<version>0.0.0.20240425</version>
<authors>Google LLC.</authors>
<description>Chrome is a popular web browser.</description>
<dependencies>
<dependency id="common.vm" version="0.0.0.20240111" />
<dependency id="common.vm" version="0.0.0.20240425" />
</dependencies>
</metadata>
</package>
9 changes: 8 additions & 1 deletion packages/googlechrome.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ try {
}
Install-ChocolateyInstallPackage @packageArgs -ErrorAction SilentlyContinue

VM-Assert-Path "${env:ProgramFiles}\Google\Chrome\Application\chrome.exe"
$exePath = "${env:ProgramFiles}\Google\Chrome\Application\chrome.exe"
VM-Assert-Path $exePath
VM-Set-Open-With-Association $exePath ".html"
} catch {
VM-Write-Log-Exception $_
}
Expand Down Expand Up @@ -52,3 +54,8 @@ $contentOptions = @{
Value = "`{`"privacy_sandbox`":{`"m1`":{`"row_notice_acknowledged`":true}}`}"
}
Set-Content @contentOptions

# Remove Edge from being default for file extensions so Chrome can be the default
ForEach ($hive in @("HKCU:", "HKLM:")) {
Remove-Item -Path "${hive}\SOFTWARE\Classes\MSEdgeHTM" -Recurse -ErrorAction SilentlyContinue
}

0 comments on commit cd5cabb

Please sign in to comment.