在 Windows Server 2016 上设置默认浏览器的命令行操作如下:

  1. 打开命令提示符或 PowerShell。

  2. 输入以下命令:

    ftype http='C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' -- "%1"

    其中,将'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' 替换为你想要设置为默认浏览器的浏览器的安装路径。

  3. 输入以下命令:

    assoc .htm=htmlfile

    assoc .html=htmlfile

    assoc .shtml=htmlfile

    assoc .xht=htmlfile

    assoc .xhtml=htmlfile

  4. 重新启动计算机,或者注销并重新登录。

这些命令将把指定的浏览器设置为默认浏览器,并将 HTML 文件的关联类型设置为“htmlfile”,以确保使用默认浏览器打开 HTML 文件。

Windows Server 2016 命令行设置默认浏览器

原文地址: https://www.cveoy.top/t/topic/oNiD 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录