2.2.3 • Published 1 year ago
windows-packages v2.2.3
A Node.js module for reading the Packages registry key on Windows 10. Useful for retrieving applications installed from the Microsoft Store.
This package has been deprecated, please use @igor.dvlpr/windows-packages instead.
✨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 --saveExports
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 brevityhas(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.gitfollowed by a,
npm installTest
Open the project and execute:
npm i
npm test