Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/igorskyflyer/npm-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. ๐
https://github.com/igorskyflyer/npm-registry-apppaths
apppaths apppaths-key back-end biome executable igorskyflyer javascript nodejs npm registry registry-apppaths retrieving-applications system typescript utility vitest windows
Last synced: about 7 hours ago
JSON representation
๐ช A Node.js module for reading the AppPaths registry key on Windows. Useful for retrieving applications that can be launched from the command prompt. ๐
- Host: GitHub
- URL: https://github.com/igorskyflyer/npm-registry-apppaths
- Owner: igorskyflyer
- License: mit
- Created: 2017-12-25T19:22:08.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-06-29T20:08:17.000Z (4 months ago)
- Last Synced: 2024-08-04T09:53:08.567Z (3 months ago)
- Topics: apppaths, apppaths-key, back-end, biome, executable, igorskyflyer, javascript, nodejs, npm, registry, registry-apppaths, retrieving-applications, system, typescript, utility, vitest, windows
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@igor.dvlpr/registry-apppaths
- Size: 241 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
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. ๐
Uses reg.exe, WINDOWS ONLY!
๐ Support further development
I work hard for every project, including this one and your support means a lot to me!
Consider buying me a coffee. โ
Thank you for supporting my efforts! ๐๐
@igorskyflyer
## ๐ต๐ผ Usage
Install it by executing:
```shell
npm i "@igor.dvlpr/registry-apppaths"
```
## ๐คน๐ผ API
`getAppPaths(): string[]`
Returns an array of sub-keys located in the AppPaths key.
```ts
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.
```ts
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.
```ts
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 examplerefreshAppPaths()
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](https://github.com/igorskyflyer/npm-registry-apppaths/blob/main/LICENSE).
---
## ๐งฌ Related
[@igor.dvlpr/pathexists](https://www.npmjs.com/package/@igor.dvlpr/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. ๐บ_
[@igor.dvlpr/valid-path](https://www.npmjs.com/package/@igor.dvlpr/valid-path)
> _๐งฐ Provides ways of testing whether a given value can be a valid file/directory name. ๐_
[@igor.dvlpr/unc-path](https://www.npmjs.com/package/@igor.dvlpr/unc-path)
> _๐ฅฝ Provides ways of parsing UNC paths and checking whether they are valid. ๐ฑ_
[@igor.dvlpr/extendable-string](https://www.npmjs.com/package/@igor.dvlpr/extendable-string)
> _๐ฆ ExtendableString allows you to create strings on steroids that have custom transformations applied to them, unlike common, plain strings. ๐ช_
[@igor.dvlpr/mp3size](https://www.npmjs.com/package/@igor.dvlpr/mp3size)
> _๐งฎ Calculates an estimated file size of Mp3 files. ๐ถ_
>
> Provided by **Igor Dimitrijeviฤ** ([*@igorskyflyer*](https://github.com/igorskyflyer/)).
>