Reputation: 5717
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?
Upvotes: 42
Views: 180249
Reputation: 11
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.
Upvotes: 0
Reputation: 41
The answer I am writing is applicable for any software/application installed on windows.
Windows 10Click on windows button and search for the application, in this case Chrome. Right click on application name and click on "Open file location".
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.
And you will get your path for desired application from tab shown in image.
PS: Doesn't works for apps installed from windows store.
Upvotes: 2
Reputation: 65
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.
Upvotes: 1
Reputation: 5717
There are also Registry Keys and environment variables to use. Check out this post for universal use for programming.
Upvotes: 30
Reputation: 9016
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)
Upvotes: 8
Reputation: 1629
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
Upvotes: 57