npm - 错误: Command failed: cscript. exe//无标志

标签 npm electron registry

我们正在使用 npm-regedit 模块在 Windows 中读取/写入注册表。我们在 Electron 应用程序中使用它。通常,当我们运行应用程序时,它工作正常,但是当我们将应用程序设置为在启动时自动运行时,regedit 模块会失败。我们在读取“HKCU/SOFTWARE”时收到以下错误:

错误:命令失败:cscript.exe//Nologo D:\CodeLathe\Workspace\cl-fc-client\clouddrive2service\ui\dist_ Electron\win-unpacked\resources\app.asar\vbs\regList.wsf A HKCU\软件

最佳答案

将regedit包中的VBS文件夹(存放.wsf文件的目录)复制到自己的目录中。 然后自定义VBS目录:regedit.setExternalVBSLocation('./common/vbs');

关于npm - 错误: Command failed: cscript. exe//无标志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59302554/

相关文章:

node.js - 从 npm 迁移到 yarn 时出错 - 引擎 "node"与此模块不兼容

typescript - 窥探 electron.BrowserWindow 构造函数并返回一个带有 Jasmine 的模拟对象

windows-7 - Windows 7上的VB6应用程序无法访问映射的驱动器

docker - 行动 : push: unauthorized to access repository docker harbor registry

c# - 文件类型图标未在 Visual Studio 中更新

node.js - 将公共(public)依赖项导入 package.json?

javascript - 在捕获被拒绝的 Promise 时对 Meteor.users 集合执行更新操作(使用 fcm-push+Meteor)

node.js - 共享 Electron 应用程序

reactjs - 在 Electron 中同时运行前端和后端

node.js - 用于本地存储库的 Node.js 的 Mercurial HG 库