Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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. ๐Ÿ—ƒ

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! ๐Ÿ™๐Ÿ˜Š





Donate to igorskyflyer




@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 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](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/)).
>