registry-apppaths
TypeScript icon, indicating that this package has built-in type declarations

1.4.2 • Public • Published

🪀 Registry AppPaths 🗃

A Node.js module for reading the AppPaths registry key on Windows. Useful for retrieving applications that can be launched from the command prompt.

Uses the reg.exe, WINDOWS ONLY!

Like it? Buy me a beer.

Donate


Since v.1.3.0 Registry AppPaths is a hybrid module that supports both CommonJS (legacy) and ES modules, thanks to Modern Module.


Install

npm install registry-apppaths --save

Exports

  • Functions
    • get(),
    • has(),
    • refresh()

Usage

.get(): string[]

Returns an array of sub-keys located in the AppPaths key.

const appPaths = require('registry-apppaths')
const apps = appPaths.get()

console.log(apps)

// ['chrome.exe', 'firefox.exe', 'opera.exe'...]

.has(list: string[]): boolean[]

Returns an array of Booleans indicating whether the entries of the parameter list are installed on the system.

const appPaths = require('registry-apppaths')
const has = appPaths.has(['chrome.exe', 'winword.exe', 'mspaintTYPO.exe'])

console.log(has)

// [true, true, false]

.refresh(): void

Force refresh the info from the registry, instead of retrieving the cached data.

const appPaths = require('registry-apppaths')
let apps = appPaths.get()

console.log(apps)

// ['chrome.exe', 'firefox.exe', 'opera.exe'...]

// application install method...

appPaths.refresh()

apps = appPaths.get()

console.log(apps)

// ['chrome.exe', 'firefox.exe', 'opera.exe', 'winword.exe'...]

Development

git clone https://github.com/igorskyflyer/node-registry-apppaths.git

followed by a,

npm i

Test

Open the project and execute:

npm i
npm test

Package Sidebar

Install

npm i registry-apppaths

Weekly Downloads

0

Version

1.4.2

License

MIT

Unpacked Size

7.64 kB

Total Files

7

Last publish

Collaborators

  • igor.dvlpr