{"id":17398469,"url":"https://github.com/vweevers/win-detect-browsers","last_synced_at":"2025-08-13T01:10:40.183Z","repository":{"id":18775155,"uuid":"21988275","full_name":"vweevers/win-detect-browsers","owner":"vweevers","description":"Fast and native browser detection on Windows.","archived":false,"fork":false,"pushed_at":"2023-06-16T03:01:24.000Z","size":248,"stargazers_count":39,"open_issues_count":6,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-11T22:38:21.770Z","etag":null,"topics":["browser-detection","browsers","nodejs","windows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vweevers.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-07-18T17:18:51.000Z","updated_at":"2024-05-17T16:42:24.000Z","dependencies_parsed_at":"2024-06-18T15:21:38.336Z","dependency_job_id":"627557c1-214a-4185-a23d-14227692d2de","html_url":"https://github.com/vweevers/win-detect-browsers","commit_stats":{"total_commits":213,"total_committers":8,"mean_commits":26.625,"dds":"0.12676056338028174","last_synced_commit":"8f5df151f1e495564058ab50b0894577a51ced0b"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/vweevers/win-detect-browsers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fwin-detect-browsers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fwin-detect-browsers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fwin-detect-browsers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fwin-detect-browsers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vweevers","download_url":"https://codeload.github.com/vweevers/win-detect-browsers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fwin-detect-browsers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270161494,"owners_count":24537654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser-detection","browsers","nodejs","windows"],"created_at":"2024-10-16T14:57:02.761Z","updated_at":"2025-08-13T01:10:40.142Z","avatar_url":"https://github.com/vweevers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# win-detect-browsers\n\n**Fast and native browser detection on Windows. Detects installed versions of [Beaker](https://beakerbrowser.com/), [Brave](https://brave.com/), [Chrome](https://www.google.com/chrome/), [Chromium](https://www.chromium.org/), [Firefox](https://www.mozilla.org/en-US/firefox/), [Internet Explorer](https://en.wikipedia.org/wiki/Internet_Explorer), [Maxthon](http://www.maxthon.com/), [Opera](https://www.opera.com/), [Safari](https://www.apple.com/safari/) and [Yandex](https://browser.yandex.com/).**\n\n[![npm](https://img.shields.io/npm/v/win-detect-browsers.svg)](https://www.npmjs.com/package/win-detect-browsers)\n[![Node version](https://img.shields.io/node/v/win-detect-browsers.svg)](https://www.npmjs.com/package/win-detect-browsers)\n[![Test](https://img.shields.io/github/workflow/status/vweevers/win-detect-browsers/Test?label=test)](https://github.com/vweevers/win-detect-browsers/actions/workflows/test.yml)\n[![Standard](https://img.shields.io/badge/standard-informational?logo=javascript\u0026logoColor=fff)](https://standardjs.com)\n[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)\n\n## Table of Contents\n\n\u003cdetails\u003e\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n- [Usage](#usage)\n- [API](#api)\n  - [`detect([names][, callback])`](#detectnames-callback)\n- [CLI](#cli)\n  - [Sample](#sample)\n- [Install](#install)\n- [Background](#background)\n- [License](#license)\n\n\u003c/details\u003e\n\n## Usage\n\n_If you are upgrading: please see the [changelog](CHANGELOG.md)._\n\n```js\nconst detect = require('win-detect-browsers')\n\n// All browsers\ndetect(function (err, browsers) {\n  if (err) throw err\n  console.log(browsers)\n})\n\n// All browsers with promise\nconst browsers = await detect()\n\n// Search only for Chrome and Firefox\ndetect(['chrome', 'firefox'], function (err, browsers) {\n  if (err) throw err\n\n  for (let b of browsers) {\n    console.log(b.version) // '57.0.2931.0'\n    console.log(b.channel) // 'canary'\n  }\n})\n```\n\n## API\n\n### `detect([names][, callback])`\n\n`names` is an array of browser names you want to find. If omitted or empty, it will detect _[everything](http://youtu.be/k1yvvNvlXtg)_. The `callback` receives an error if any and an array of `results`. A result is excluded if its path has no `.exe` extension or if its version could not be read. If no callback is provided, a promise is returned.\n\nEach `result` is an object with the following properties:\n\n- `name` (string): `chrome`, `chromium`, `firefox`, `beaker`, `brave`, `ie`, `msedge`, `maxthon`, `opera`, `safari`, `yandex`\n- `path` (string): absolute path to executable\n- `version` (string)\n- `arch` (string): CPU type the executable was built for: `amd64`, `i386` or [other](https://github.com/vweevers/pe-machine-type#types);\n- `info` (object): executable metadata (see [sample](#sample) below).\n\nAdditional properties are usually available but not guaranteed:\n\n- `channel` (string):\n  - Chrome: `stable`, `canary`, `beta` or `dev`\n  - Firefox: `release`, `developer`, `nightly` or [`esr`](https://www.mozilla.org/en-US/firefox/organizations/faq/)\n  - Older versions of Firefox: `aurora`, `beta` or `rc`;\n  - Opera: `stable`, `beta` or `developer`.\n\n## CLI\n\n```\nwin-detect-browsers [options] [name, name..]\n```\n\nWrite browsers to stdout as a JSON array. Includes all browsers unless one or more names are given (see list above).\n\nOptions:\n\n- `--help` `-h`: Show help\n- `--version` `-v`: Show CLI version number\n- `--summary` `-s`: Less properties;\n- `--debug` `-d`: Enable debug output.\n\n### Sample\n\nOn Windows 10:\n\n\u003cdetails\u003e\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n```json\n[\n  {\n    \"name\": \"ie\",\n    \"path\": \"C:\\\\Program Files\\\\Internet Explorer\\\\iexplore.exe\",\n    \"version\": \"11.0.17134.1\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"11.0.17134.1\",\n      \"CompanyName\": \"Microsoft Corporation\",\n      \"FileDescription\": \"Internet Explorer\",\n      \"InternalName\": \"iexplore\",\n      \"LegalCopyright\": \"© Microsoft Corporation. Alle rechten voorbehouden.\",\n      \"OriginalFilename\": \"IEXPLORE.EXE.MUI\",\n      \"ProductName\": \"Internet Explorer\",\n      \"ProductVersion\": \"11.00.17134.1\"\n    }\n  },\n  {\n    \"name\": \"ie\",\n    \"path\": \"C:\\\\Program Files (x86)\\\\Internet Explorer\\\\iexplore.exe\",\n    \"version\": \"11.0.17134.1\",\n    \"arch\": \"i386\",\n    \"info\": {\n      \"FileVersion\": \"11.0.17134.1\",\n      \"CompanyName\": \"Microsoft Corporation\",\n      \"FileDescription\": \"Internet Explorer\",\n      \"InternalName\": \"iexplore\",\n      \"LegalCopyright\": \"© Microsoft Corporation. Alle rechten voorbehouden.\",\n      \"OriginalFilename\": \"IEXPLORE.EXE.MUI\",\n      \"ProductName\": \"Internet Explorer\",\n      \"ProductVersion\": \"11.00.17134.1\"\n    }\n  },\n  {\n    \"name\": \"firefox\",\n    \"path\": \"C:\\\\Program Files\\\\Mozilla Firefox\\\\firefox.exe\",\n    \"version\": \"61.0.0.6711\",\n    \"channel\": \"release\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"61.0.0.6711\",\n      \"LegalCopyright\": \"©Firefox and Mozilla Developers; available under the MPL 2 license.\",\n      \"CompanyName\": \"Mozilla Corporation\",\n      \"FileDescription\": \"Firefox\",\n      \"ProductVersion\": \"61.0\",\n      \"InternalName\": \"Firefox\",\n      \"LegalTrademarks\": \"Firefox is a Trademark of The Mozilla Foundation.\",\n      \"OriginalFilename\": \"../../dist/bin/firefox.exe\",\n      \"ProductName\": \"Firefox\",\n      \"BuildID\": \"20180517141400\"\n    }\n  },\n  {\n    \"name\": \"firefox\",\n    \"path\": \"C:\\\\Program Files\\\\Firefox Developer Edition\\\\firefox.exe\",\n    \"version\": \"61.0.0.6711\",\n    \"channel\": \"developer\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"61.0.0.6711\",\n      \"LegalCopyright\": \"©Firefox and Mozilla Developers; available under the MPL 2 license.\",\n      \"CompanyName\": \"Mozilla Corporation\",\n      \"FileDescription\": \"Firefox Developer Edition\",\n      \"ProductVersion\": \"61.0\",\n      \"InternalName\": \"Firefox Developer Edition\",\n      \"LegalTrademarks\": \"Firefox is a Trademark of The Mozilla Foundation.\",\n      \"OriginalFilename\": \"../../dist/bin/firefox.exe\",\n      \"ProductName\": \"Firefox Developer Edition\",\n      \"BuildID\": \"20180517141400\"\n    }\n  },\n  {\n    \"name\": \"firefox\",\n    \"path\": \"C:\\\\Program Files\\\\Firefox Nightly\\\\firefox.exe\",\n    \"version\": \"62.0.0.6712\",\n    \"channel\": \"nightly\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"62.0.0.6712\",\n      \"LegalCopyright\": \"©Firefox and Mozilla Developers; available under the MPL 2 license.\",\n      \"CompanyName\": \"Mozilla Corporation\",\n      \"FileDescription\": \"Firefox Nightly\",\n      \"ProductVersion\": \"62.0a1\",\n      \"InternalName\": \"Firefox Nightly\",\n      \"LegalTrademarks\": \"Firefox is a Trademark of The Mozilla Foundation.\",\n      \"OriginalFilename\": \"firefox.exe\",\n      \"ProductName\": \"Firefox Nightly\",\n      \"BuildID\": \"20180518222751\"\n    }\n  },\n  {\n    \"name\": \"chrome\",\n    \"path\": \"C:\\\\Users\\\\vweevers\\\\AppData\\\\Local\\\\Google\\\\Chrome SxS\\\\Application\\\\chrome.exe\",\n    \"version\": \"68.0.3436.0\",\n    \"channel\": \"canary\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"68.0.3436.0\",\n      \"CompanyName\": \"Google Inc.\",\n      \"FileDescription\": \"Google Chrome\",\n      \"InternalName\": \"chrome_exe\",\n      \"LegalCopyright\": \"Copyright 2017 Google Inc. All rights reserved.\",\n      \"OriginalFilename\": \"chrome.exe\",\n      \"ProductName\": \"Google Chrome\",\n      \"ProductVersion\": \"68.0.3436.0\",\n      \"CompanyShortName\": \"Google\",\n      \"ProductShortName\": \"Chrome\",\n      \"LastChange\": \"e0f81fe637f233bf12e821915b72bc8d2194c3f2-refs/branch-heads/3436@{#1}\",\n      \"Official Build\": \"1\"\n    }\n  },\n  {\n    \"name\": \"chrome\",\n    \"path\": \"C:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n    \"version\": \"66.0.3359.181\",\n    \"channel\": \"stable\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"66.0.3359.181\",\n      \"CompanyName\": \"Google Inc.\",\n      \"FileDescription\": \"Google Chrome\",\n      \"InternalName\": \"chrome_exe\",\n      \"LegalCopyright\": \"Copyright 2017 Google Inc. All rights reserved.\",\n      \"OriginalFilename\": \"chrome.exe\",\n      \"ProductName\": \"Google Chrome\",\n      \"ProductVersion\": \"66.0.3359.181\",\n      \"CompanyShortName\": \"Google\",\n      \"ProductShortName\": \"Chrome\",\n      \"LastChange\": \"a10b9cedb40738cb152f8148ddab4891df876959-refs/branch-heads/3359@{#828}\",\n      \"Official Build\": \"1\"\n    }\n  },\n  {\n    \"name\": \"opera\",\n    \"path\": \"C:\\\\Program Files\\\\Opera beta\\\\Launcher.exe\",\n    \"version\": \"53.0.2907.31\",\n    \"channel\": \"beta\",\n    \"arch\": \"amd64\",\n    \"info\": {\n      \"FileVersion\": \"53.0.2907.31\",\n      \"LegalCopyright\": \"Copyright Opera Software 2018\",\n      \"InternalName\": \"Opera\",\n      \"CompanyName\": \"Opera Software\",\n      \"ProductName\": \"Opera beta Internet Browser\",\n      \"ProductVersion\": \"53.0.2907.31\",\n      \"FileDescription\": \"Opera beta Internet Browser\"\n    }\n  }\n]\n```\n\n\u003c/details\u003e\n\n## Install\n\nWith [npm](https://npmjs.org) do:\n\n```bash\nnpm install win-detect-browsers     # For API\nnpm install win-detect-browsers -g  # For CLI\n```\n\n## Background\n\nBrowser detection on Windows can't be done right. This is the _try-everything-and-fail-silently_ approach. It accounts for architecture differences, normalizes environment variables, tries default locations, searches the registry (in the HKLM and HKCU hives as well as WoW counterparts) (including [Start Menu Internet Applications](http://msdn.microsoft.com/en-us/library/windows/desktop/dd203067(v=vs.85).aspx), Google Updater and more), and looks in `PATH`. Version numbers are then read from the executable metadata.\n\n`browser-launcher` by substack has [poor Windows support](https://github.com/substack/browser-launcher/issues/7), and it prompted me to create this module. It is now used in [browser-launcher2](https://github.com/benderjs/browser-launcher2), ~~an active~~ a once active fork of `browser-launcher`.\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fwin-detect-browsers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvweevers%2Fwin-detect-browsers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fwin-detect-browsers/lists"}