Universal path to chrome.exe

前端 未结 7 1362
失恋的感觉
失恋的感觉 2020-12-29 04:15

I am making an application and I want to make it installable on the user\'s desktops using chrome URL shortcut. Therefore, is there a universal path to the chrome.exe that c

7条回答
  •  不知归路
    2020-12-29 04:55

    The registry option might be the best, but the one suggested in the other answer didn't exist in my computer (Windows 10 64-bit). I think the "Uninstall" key might be more robust. If it didn't exist, users would have a hard time uninstalling Chrome. The following keys give you the install location, you'll need to append "\chrome.exe" to get the full path to the executable:

    Chrome:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome\InstallLocation
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome\InstallLocation
    

    Chrome Canary:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome SxS\InstallLocation
    
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome SxS\InstallLocation
    

提交回复
热议问题