@igor.dvlpr/registry-apppaths
v1.0.0
Published
🪀 A Node.js module for reading the AppPaths registry key on Windows. Useful for retrieving applications that can be launched from the command prompt. 🗃
Downloads
4
Maintainers
Readme
🪀 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. 🗃
🕵🏼 Usage
Install it by executing:
npm i "@igor.dvlpr/registry-apppaths"
🤹🏼 API
getAppPaths(): string[]
Returns an array of sub-keys located in the AppPaths key.
import { getAppPaths } from '@igor.dvlpr/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 '@igor.dvlpr/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 '@igor.dvlpr/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'...]
🪪 License
Licensed under the MIT license which is available here, MIT license.
🧬 Related
🧲 Provides ways of properly checking if a path exists inside a given array of files/directories both on Windows and UNIX-like operating systems. 🗺
🧰 Provides ways of testing whether a given value can be a valid file/directory name. 🏜
🥽 Provides ways of parsing UNC paths and checking whether they are valid. 🎱
🦀 ExtendableString allows you to create strings on steroids that have custom transformations applied to them, unlike common, plain strings. 🪀
🧮 Calculates an estimated file size of Mp3 files. 🎶
Provided by Igor Dimitrijević (@igorskyflyer).