Universal path to chrome.exe

google-chrome, google-chrome-app

Solution

Chrome installs by default to the User's AppData Local folder:

XP:

C:\Documents and Settings\UserName\Local Settings\Application Data\Google\Chrome

Vista:

C:\Users\UserName\AppDataLocal\Google\Chrome

Windows 7:

C:\Program Files (x86)\Google\Application

Win 7/8/10/11, (either):

- C:\Program Files (x86)\Google\Chrome\Application
- C:\Program Files\Google\Chrome\Application

Best bet is to use some OS detection code, then use an environment variable to detect the User's `AppData` folder (i.e. `%LOCALAPPDATA%`) or the `ProgramFiles` folder, and then append the difference in OS's to the end of the variable.

Problem

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 can launch my app on all Windows versions ( XP, Seven and vista )

Original source

Related problems