/ 代码 / 53 浏览

通过 Node.js 获取电脑安装的软件,支持 Windows 和 Mac 两个平台

地址:https://github.com/Xutaotaotao/get-installed-apps

通过 Node.js 获取电脑安装的软件,支持 Windows 和 Mac 两个平台。

👨‍💻 安装

npm install get-installed-apps

🔌 用法

ES6 Module

import {getInstalledApps} from 'get-installed-apps'

getInstalledApps().then(apps => {
  console.log(apps)
})

CommonJS

const {getInstalledApps} = require('get-installed-apps')
getInstalledApps().then(apps => {
  console.log(apps)
})

如果你只想在 mac 平台上使用,可以这么做:

import {getMacInstalledApps} from 'get-installed-apps'

getMacInstalledApps().then(apps => {
  console.log(apps)
})

getMacInstalledApps 有一个可选参数 directory, 默认是’/Applications’,你如果还需要获取其他目录的 app,可以自己设置。

如果你只想在 windows 平台上使用,可以这么做:

import {getWinInstalledApps} from 'get-installed-apps'

getWinInstalledApps().then(apps => {
  console.log(apps)
})
maofun
GPTs Works,一款第三方 GPTs 应用商店
GPTs Works,一款第三方 GPTs 应用商店
做一个网盘搜索引擎
做一个网盘搜索引擎
OpenAI正在调查关于真实的人物的虚假,有害的陈述
Cloudflare Warp 官方客户端自选接入点IP的方法
ssh无需密码登陆(使用密钥对)
开源:ChatGPT连续对话Python Web版,docker部署,在线更新Token
开源:ChatGPT连续对话Python Web版,docker部署,在线更新Token

0 条评论

  1. no comments.

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注