Skip to content

Add more paths for Chrome & Chromium packages#2980

Merged
kevoreilly merged 1 commit into
kevoreilly:masterfrom
adepasquale:chrome_chromium
Apr 16, 2026
Merged

Add more paths for Chrome & Chromium packages#2980
kevoreilly merged 1 commit into
kevoreilly:masterfrom
adepasquale:chrome_chromium

Conversation

@adepasquale
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the executable search paths for Google Chrome and Chromium across several analysis packages, including chrome.py, chromium.py, chromium_ext.py, and crx.py, to ensure the browsers are correctly located. The feedback recommends adding Program Files (x86) paths for both browsers to improve robustness and support 32-bit installations on 64-bit Windows environments.

"""Chrome analysis package."""

PATHS = [
("LOCALAPPDATA", "Google", "Chrome", "Application", "chrome.exe"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

On 64-bit Windows systems, Google Chrome is frequently installed in the Program Files (x86) directory. Adding this path ensures the package can locate the browser in such environments.

Suggested change
("LOCALAPPDATA", "Google", "Chrome", "Application", "chrome.exe"),
("LOCALAPPDATA", "Google", "Chrome", "Application", "chrome.exe"),
("ProgramFiles(x86)", "Google", "Chrome", "Application", "chrome.exe"),

PATHS = [
("LOCALAPPDATA", "Chromium", "Application", "chrome.exe"),
("ProgramFiles", "Google", "Chrome", "Application", "chrome.exe"),
("ProgramFiles", "Chromium", "Application", "chrome.exe"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Chromium may also be installed in the Program Files (x86) directory on 64-bit Windows. Including this path improves the robustness of the package.

        ("ProgramFiles", "Chromium", "Application", "chrome.exe"),
        ("ProgramFiles(x86)", "Chromium", "Application", "chrome.exe"),

PATHS = [
("LOCALAPPDATA", "Chromium", "chrome.exe"),
("LOCALAPPDATA", "Chromium", "Application", "chrome.exe"),
("ProgramFiles", "Chromium", "Application", "chrome.exe"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding the Program Files (x86) path for Chromium ensures compatibility with 32-bit installations on 64-bit Windows systems.

        ("ProgramFiles", "Chromium", "Application", "chrome.exe"),
        ("ProgramFiles(x86)", "Chromium", "Application", "chrome.exe"),

"""CRX extensions analysis package."""

PATHS = [
("LOCALAPPDATA", "Google", "Chrome", "Application", "chrome.exe"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It is recommended to include the Program Files (x86) path for Google Chrome to support 64-bit Windows environments where the 32-bit version of the browser is installed.

Suggested change
("LOCALAPPDATA", "Google", "Chrome", "Application", "chrome.exe"),
("LOCALAPPDATA", "Google", "Chrome", "Application", "chrome.exe"),
("ProgramFiles(x86)", "Google", "Chrome", "Application", "chrome.exe"),

("LOCALAPPDATA", "Google", "Chrome", "Application", "chrome.exe"),
("ProgramFiles", "Google", "Chrome", "Application", "chrome.exe"),
("LOCALAPPDATA", "Chromium", "Application", "chrome.exe"),
("ProgramFiles", "Chromium", "Application", "chrome.exe"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similarly, adding the Program Files (x86) path for Chromium in this package ensures it can be found on 64-bit systems.

        ("ProgramFiles", "Chromium", "Application", "chrome.exe"),
        ("ProgramFiles(x86)", "Chromium", "Application", "chrome.exe"),

@adepasquale
Copy link
Copy Markdown
Contributor Author

None of the gemini suggestions make sense:

elif basedir == "ProgramFiles":
if os.getenv("ProgramFiles(x86)"):
yield os.path.join(os.getenv("ProgramFiles(x86)"), *path[1:])

@kevoreilly kevoreilly merged commit d6d0c24 into kevoreilly:master Apr 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants