[英]How to package nodejs and install a windows service with NSIS?
I am currently using os-service to create a Windows service that needs to be packaged with my Electron application.我目前正在使用os-service创建一个需要与我的 Electron 应用程序一起打包的 Windows 服务。 Currently, everything is installed with NSIS, but I'm not quite sure how to install and run an os-service script during installation.
目前,一切都与 NSIS 一起安装,但我不太确定如何在安装过程中安装和运行os-service脚本。 Likewise for uninstallation.
卸载也是一样。
Anyone with experience with this?任何有这方面经验的人? The service is installed using node to run the script.
该服务是使用 node 安装来运行脚本的。
When you install Node.js runtime on target computer it should contain everything necessary to run apps properly.当您在目标计算机上安装 Node.js 运行时,它应该包含正确运行应用程序所需的一切。
Node.js also installs npm so it should be possible to execute npm install os-service
from your NSIS installer somehow like this: Node.js 还安装npm,因此应该可以像这样从 NSIS 安装程序执行
npm install os-service
:
npm install os-service
from your installer - again use ExecWait or related.npm install os-service
从你的安装程序 - 再次使用 ExecWait 或相关的。 You will have to use absolute paths and so on. I have no experience with web apps, there more be some dependencies and so on so you need to do a little more investigation.我没有使用网络应用程序的经验,还有一些依赖项等等,所以你需要做更多的调查。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.