Skip to content

igorskyflyer/npm-registry-apppaths

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

178 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Icon of Registry AppPaths

Registry AppPaths


๐Ÿช€ A package for reading the AppPaths registry key on Windows. Useful for retrieving applications that can be launched from the command prompt. ๐Ÿ—ƒ



๐Ÿ›‘ CAUTION

WINDOWS ONLY

This package uses reg.exe under the hood, thus, only works on Windows OS.




๐Ÿ“ƒ Table of Contents



๐Ÿค– Features

  • โšก Instant results - reads Windows App Paths registry keys synchronously
  • ๐Ÿ—‚ Full list retrieval - grab all registered app paths in one call
  • ๐Ÿง  Smart caching - avoids repeated registry lookups for faster performance
  • ๐Ÿ”„ Force refresh - bypass cache when you need the latest data
  • ๐Ÿ” Key presence check - verify if specific apps are registered
  • ๐Ÿ”  Case sensitivity option - match keys exactly or loosely
  • ๐Ÿงน Cache clear - reset stored results anytime
  • ๐Ÿ’ป Windows-only - throws error if run on nonโ€‘Windows systems


๐Ÿ•ต๐Ÿผ Usage

Install it by executing any of the following, depending on your preferred package manager:

pnpm add @igorskyflyer/registry-apppaths
yarn add @igorskyflyer/registry-apppaths
npm i @igorskyflyer/registry-apppaths


๐Ÿคน๐Ÿผ API

getAppPaths(): string[]

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

import { getAppPaths } from '@igorskyflyer/registry-apppaths'

const apps: string[] = getAppPaths()

console.log(apps) // ['chrome.exe', 'firefox.exe', 'opera.exe'...]

hasAppPaths(list: string[]): boolean[]

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

import { hasAppPaths } from '@igorskyflyer/registry-apppaths'

const has: boolean[] = hasAppPaths(['chrome.exe', 'winword.exe', 'mspaintTYPO.exe'])

console.log(has) // [true, true, false]

refreshAppPaths(): void

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

import { getAppPaths, refreshAppPaths } from '@igorskyflyer/registry-apppaths'

let apps: string[] = getAppPaths()

console.log(apps) // ['chrome.exe', 'firefox.exe', 'opera.exe'...]

// application install...
// we installed Word for example

refreshAppPaths()

apps = getAppPaths()

console.log(apps) // ['chrome.exe', 'firefox.exe', 'opera.exe', 'winword.exe'...]


๐Ÿ“ Changelog

๐Ÿ“‘ The changelog is available here, CHANGELOG.md.



๐Ÿชช License

Licensed under the MIT license which is available here, MIT license.



๐Ÿ’– Support

I work hard for every project, including this one and your support means a lot to me!
Consider buying me a coffee. โ˜•

Donate to igorskyflyer

Thank you for supporting my efforts! ๐Ÿ™๐Ÿ˜Š


๐Ÿงฌ Related

@igorskyflyer/pathexists

๐Ÿงฒ Provides ways of properly checking if a path exists inside a given array of files/directories both on Windows and UNIX-like operating systems. ๐Ÿ—บ

@igorskyflyer/valid-path

๐Ÿงฐ Provides ways of testing whether a given value can be a valid file/directory name. ๐Ÿœ

@igorskyflyer/unc-path

๐Ÿฅฝ Provides ways of parsing UNC paths and checking whether they are valid. ๐ŸŽฑ

@igorskyflyer/extendable-string

๐Ÿฆ€ ExtendableString allows you to create strings on steroids that have custom transformations applied to them, unlike common, plain strings. ๐Ÿช€

@igorskyflyer/mp3size

๐Ÿงฎ Calculates an estimated file size of Mp3 files. ๐ŸŽถ




๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Author

Created by Igor Dimitrijeviฤ‡ (@igorskyflyer).

About

๐Ÿช€ A package for reading the AppPaths registry key on Windows. Useful for retrieving applications that can be launched from the command prompt. ๐Ÿ—ƒ

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

Contributors