Windows Server 2016 命令行设置默认浏览器
在 Windows Server 2016 上设置默认浏览器的命令行操作如下:
-
打开命令提示符或 PowerShell。
-
输入以下命令:
ftype http='C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' -- "%1"其中,将'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' 替换为你想要设置为默认浏览器的浏览器的安装路径。
-
输入以下命令:
assoc .htm=htmlfileassoc .html=htmlfileassoc .shtml=htmlfileassoc .xht=htmlfileassoc .xhtml=htmlfile -
重新启动计算机,或者注销并重新登录。
这些命令将把指定的浏览器设置为默认浏览器,并将 HTML 文件的关联类型设置为“htmlfile”,以确保使用默认浏览器打开 HTML 文件。
原文地址: https://www.cveoy.top/t/topic/oNiD 著作权归作者所有。请勿转载和采集!