[英]InnoSetup and NSSM Exit code 5
I have an application installer in node-js platform, currently developing an installer with Inno Setup and NSSM (The application should run as a service).我在 node-js 平台上有一个应用程序安装程序,目前正在使用 Inno Setup 和 NSSM 开发一个安装程序(该应用程序应该作为服务运行)。
The thing is when NSSM tries to register the service (The device is a Windows 8.1 32 bits Enterprise running over a tablet PC), NSSM fails with Exit code 5.问题是,当 NSSM 尝试注册该服务(该设备是在平板电脑上运行的 Windows 8.1 32 位企业版)时,NSSM 失败并显示退出代码 5。
I couldn't find anything more usefull than access denied and no help in the matter.我找不到比拒绝访问更有用的东西,而且在这件事上没有帮助。 Tried a lot of stuff, like changing the folders, the names, the users, every time, it fails.
尝试了很多东西,比如更改文件夹、名称、用户,每次都失败了。
Inno script looks like this: Inno 脚本如下所示:
; Add System Service Filename: "{app}\{#NSSM}";
Parameters: "install {#MyAppShortName} {app}\winstart-server.bat";
Flags: runhidden runascurrentuser;
Filename: "{app}\{#NSSM}";
Parameters: "set {#MyAppShortName} AppStdin {app}\{#MyAppShortName}.log";
Flags: runhidden runascurrentuser;
Filename: "{app}\{#NSSM}";
Parameters: "set {#MyAppShortName} AppStdout {app}\{#MyAppShortName}.log";
Flags: runhidden runascurrentuser;
Filename: "{app}\{#NSSM}";
Parameters: "set {#MyAppShortName} AppStderr {app}\{#MyAppShortName}.log";
Flags: runhidden runascurrentuser;
Filename: "{app}\{#NSSM}";
Parameters: "set {#MyAppShortName} AppRotateFiles 1";
Flags: runhidden runascurrentuser;
Filename: "{sys}\net.exe";
Parameters: "start {#MyAppShortName}";
Flags: runhidden runascurrentuser;
And the log prompts from the installer when is run looks like this:运行时安装程序的日志提示如下所示:
2015-09-07 20:41:22.616 -- Run entry --
2015-09-07 20:41:22.616 Run as: Current user
2015-09-07 20:41:22.616 Type: Exec
2015-09-07 20:41:22.616 Filename: C:\Monitor\nssm.exe
2015-09-07 20:41:22.616 Parameters: install Monitor C:\Monitor\winstart-server.bat
2015-09-07 20:41:24.262 Process exit code: 5
2015-09-07 20:41:24.262 -- Run entry --
2015-09-07 20:41:24.262 Run as: Current user
2015-09-07 20:41:24.262 Type: Exec
2015-09-07 20:41:24.262 Filename: C:\Monitor\nssm.exe
2015-09-07 20:41:24.262 Parameters: set Monitor AppStdin C:\Monitor\Monitor.log
2015-09-07 20:41:24.299 Process exit code: 3
2015-09-07 20:41:24.299 -- Run entry --
2015-09-07 20:41:24.299 Run as: Current user
2015-09-07 20:41:24.299 Type: Exec
2015-09-07 20:41:24.299 Filename: C:\Monitor\nssm.exe
2015-09-07 20:41:24.299 Parameters: set Monitor AppStdout C:\Monitor\Monitor.log
2015-09-07 20:41:24.365 Process exit code: 3
2015-09-07 20:41:24.365 -- Run entry --
2015-09-07 20:41:24.365 Run as: Current user
2015-09-07 20:41:24.365 Type: Exec
2015-09-07 20:41:24.365 Filename: C:\Monitor\nssm.exe
2015-09-07 20:41:24.365 Parameters: set Monitor AppStderr C:\Monitor\Monitor.log
2015-09-07 20:41:24.415 Process exit code: 3
2015-09-07 20:41:24.415 -- Run entry --
2015-09-07 20:41:24.415 Run as: Current user
2015-09-07 20:41:24.415 Type: Exec
2015-09-07 20:41:24.415 Filename: C:\Monitor\nssm.exe
2015-09-07 20:41:24.415 Parameters: set Monitor AppRotateFiles 1
2015-09-07 20:41:24.458 Process exit code: 3
As you can see, the first taks fails with 5 and then the others prompt a 3 because the service was not registered.如您所见,第一个 taks 失败并显示 5,然后其他人提示 3,因为该服务未注册。
Any clues?有什么线索吗? Thank you very much on advance.
非常感谢您提前。
I think the problem is that windows already has a service called "Monitor" (sys/DRIVERS/monitor).我认为问题在于 Windows 已经有一个名为“Monitor”(sys/DRIVERS/monitor)的服务。 Try changing the name of your service for something else!
尝试将您的服务名称更改为其他内容!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.