2
我在node-js平臺上有一個應用程序安裝程序,目前正在開發一個安裝程序,其中包含Inno Setup和NSSM(應用程序應作爲服務運行)。InnoSetup和NSSM退出代碼5
的事情是,當NSSM嘗試註冊服務(該設備是Windows 8.1的32位企業運行在平板電腦),NSSM失敗,退出代碼5
我無法找到任何有用的多比拒絕訪問和在這個問題上沒有幫助。嘗試了很多東西,比如每次更改文件夾,名稱和用戶,都會失敗。
的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;
,並運行這個樣子的,當數從安裝程序提示:
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
正如你所看到的,第一TAKS失敗,5和那麼其他人會提示3,因爲服務沒有註冊。
任何線索?非常感謝您的提前。
您是否以管理員身份運行安裝程序? –
是的,我認爲權限沒問題。還嘗試將用戶更改爲高級用戶。 –
請嘗試在CLI命令'C:\ Monitor \ nssm.exe安裝MyMonitorService C:\ Monitor \ winstart-server.bat' - 僅用於測試服務安裝下的不同名稱和inno以外。 –