38

Google repeatedly changed the path to the .exe of Chrome. Sometimes it's hidden in %APPDATA%, in Version 35/36 they changed the path back to program files. There are also differencies across the Windows versions.

Where is Google Chrome located in Windows 10?

Hannes Schneidermayer
  • 4,729
  • 2
  • 28
  • 32
  • See https://stackoverflow.com/questions/45384893/how-do-i-use-c-sharp-to-get-the-path-to-chrome-exe-on-windows/45384927#45384927 – zumalifeguard Aug 31 '17 at 23:07

7 Answers7

50

Please see the screenshot which gives you the ability to seek for the current path of google chrome path or any other application Task Manager - Windows 10

enter image description here

Ahmad Hindash
  • 1,519
  • 15
  • 16
30

Windows 10:

  • %ProgramFiles%\Google\Chrome\Application\chrome.exe
  • %ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe
  • %LocalAppData%\Google\Chrome\Application\chrome.exe

Windows 7:

  • C:\Program Files (x86)\Google\Application\chrome.exe

Vista:

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

XP:

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

There are also Registry Keys and environment variables to use. Check out this post for universal use for programming.

Hannes Schneidermayer
  • 4,729
  • 2
  • 28
  • 32
6

Chrome can be installed in various places on Windows, for a given user or "all users", in which case it's installed in Program Files.

To determine where it is programmatically:

Batch file:

set exe=
FOR /F "tokens=2* skip=2" %%a in ('reg query HKCR\ChromeHTML\shell\open\command /ve') do set exe=%%b
set exe=%exe:"=%
set exe=%exe:~0,-6%

PowerShell:

(gp Registry::HKCR\ChromeHTML\shell\open\command)."(Default)" -match '"(.*?)"' | Out-Null
$exe=$matches[1]

C#:

var exe = System.Text.RegularExpressions.Regex.Match((string)Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(@"ChromeHTML\shell\open\command").GetValue(null),
          @"""(.*?)""",
          System.Text.RegularExpressions.RegexOptions.None)
      .Groups[1].Value;

Python

import winreg
import re
command = winreg.QueryValueEx(winreg.OpenKey(winreg.HKEY_CLASSES_ROOT, "ChromeHTML\\shell\open\\command", 0, winreg.KEY_READ), "")[0]
exe=re.search("\"(.*?)\"", command).group(1)

VBA / VBScript

Set objShell = CreateObject("WScript.Shell")
cmd = objShell.RegRead("HKCR\ChromeHTML\shell\open\command\")
exe = Mid(cmd, 2, 999)
exe = Left(exe, InStr(exe, Chr(34)) - 1)
zumalifeguard
  • 8,648
  • 5
  • 43
  • 56
  • Thank you for a programmatic answer - not sure why you would want another else on stack overflow! :) – mutex Oct 14 '21 at 03:45
  • 1
    Tried the batch version and did not work for me since my registry has: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --single-argument %1 – Tolga Dec 20 '21 at 05:08
2

The answer I am writing is applicable for any software/application installed on windows.

Windows 10
  1. Click on windows button and search for the application, in this case Chrome. Right click on application name and click on "Open file location". enter image description here

  2. You will reach at location of the shortcut of that application. Again right click on the application shortcut and then click on "Open file location" and you will get the path from top url/path bar of explorer or you can click on properties to get the path as shown in image. enter image description here

And you will get your path for desired application from tab shown in image. enter image description here

PS: Doesn't works for apps installed from windows store.

1

To find the location of Google, type the following command...

chrome://version

And then look for Command Line on the left side of the screen.

0

Right click on the sub process to see the open file location :

Screenshot

0

I found something in the Registry when I installed Chrome Canary at the same time.

in a batch file, using chrome.exe it always opens Canary...

then I change from: Equipo\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe "C:\Users\heratess\AppData\Local\Google\Chrome SxS\Application\chrome.exe"

To: Equipo\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe C:\Program Files\Google\Chrome\Application\chrome.exe

and it worked for me.

maybe it could help you.

Hec
  • 11
  • 4