win + r 打开命令运行面板 regedit
    image.png
    修改注册表以下地方:

    1. HKEY_CLASSES_ROOT\http\shell\open\command
    2. HKEY_CLASSES_ROOT\https\shell\open\command
    3. HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command
    4. HKEY_CLASSES_ROOT\ftp\shell\open\command
    5. HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\shell\open\command
    6. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\shell\open\command
    7. HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Clients\StartMenuInternet\Google Chrome\shell\open\command

    image.png
    这四个地方原始内容都是同一个值

    1. "C:\Program Files\Google\Chrome\Application\chrome.exe" --single-argument %1

    在chrome路径后, %1之前, 加入你的参数
    例如:

    1. "C:\Program Files\Google\Chrome\Application\chrome.exe" --user-data-dir="D:\Software\Chrome\AppData\lwm\data" --single-argument %1

    配置完成后重新打开浏览器, 输入以下 URL 可验证配置是否成功

    1. chrome://version/

    image.png

    Chrome 在注册表的各种路径

    1. C:\Program Files\Google\Chrome\Application\chrome.exe
    2. C:\Program Files\Google\Chrome\Application\chrome.exe
    3. C:\Program Files\Google\Chrome\Application\chrome.exe
    4. C:\Program Files\Google\Chrome\Application\chrome.exe
    5. HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store
    6. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe
    7. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\Application
    8. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML\DefaultIcon
    9. HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\Capabilities
    10. HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\DefaultIcon
    11. HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\InstallInfo
    12. HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Clients\StartMenuInternet\Google Chrome\Capabilities
    13. HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Clients\StartMenuInternet\Google Chrome\DefaultIcon
    14. HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Clients\StartMenuInternet\Google Chrome\InstallInfo
    15. HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe