windows-packages

πŸ’» A Node.js module for reading the Packages registry key on Windows 10. Useful for retrieving Windows 10 installed Store applications. πŸ“¦

Usage no npm install needed!

<script type="module">
  import windowsPackages from 'https://cdn.skypack.dev/windows-packages';
</script>

README

Windows Packages - NPM Package

Windows Packages

A Node.js module for reading the Packages registry key on Windows 10. Useful for retrieving applications installed from the Microsoft Store.

Uses reg.exe, WINDOWS ONLY!

Like it? Buy me a beer.

Donate

✨Since v.2.1.0 Windows Packages is a hybrid module that supports both CommonJS (legacy) and ES modules, thanks to Modern Module.



Install

npm install windows-packages --save

Exports

  • Functions
    • get(),
    • has().

Usage

get(): string[]

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

import * as winPkgs from 'windows-packages'
const packages = winPkgs.get()

console.log(packages) // ['Microsoft.MicrosoftEdge_44.18362.267.0...', 'Microsoft.Microsoft3DViewer_7.1908.9012.0...',...]

// names shortened for the sake of brevity

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

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

import * as winPkgs from 'windows-packages'
const has = winPkgs.has(['edge', 'foobar', 'mspaint'])

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

Development

git clone https://github.com/igorskyflyer/npm-windows-packages.git

followed by a,

npm install

Test

Open the project and execute:

npm test