如何在 NSIS 中使用具有依赖项的 SimpleSC
How can I use SimpleSC with Dependencies in NSIS
我的项目结构如下(示例):
Installer\Dependencies\Myservice.exe
Installer\Dependencies\dependenci.dll
Installer\Dependencies\js\file.js
Installer\Dependencies\resources\folder\file.js
在这些文件夹中的每一个中,我都很好地安装了对服务的依赖项。
如果依赖项,我如何使用 simpleSC 安装服务?
我知道语句:
SimpleSC::InstallService [name_of_service] [display_name] [service_type][start_type] [binary_path] [dependencies] [account] [password]
我已经尝试过了,但没有用:
SimpleSC::InstallService "LprService" "LprService" "272" "2" "$INSTDIR\GeneteLPRService.exe" "Dependencies" "" ""
P.s.: 使用InstallUtil.exe,有效
SimpleSC 依赖项是在您的服务启动之前必须启动的其他服务的列表。
The Wiki page有个例子:
; Depends on "Windows Time Service" (w32time) and "WWW Publishing Service" (w3svc):
SimpleSC::InstallService "MyService" "My Display Name" "16" "2" "$InstDir\MyService.exe" "w32time/w3svc" "" ""
Pop [=10=]
如果您没有任何服务依赖项,那么您可以像其他未使用的参数一样使用空字符串。
您的服务需要的文件可以File
或File /r
正常安装。
我的项目结构如下(示例):
Installer\Dependencies\Myservice.exe
Installer\Dependencies\dependenci.dll
Installer\Dependencies\js\file.js
Installer\Dependencies\resources\folder\file.js
在这些文件夹中的每一个中,我都很好地安装了对服务的依赖项。
如果依赖项,我如何使用 simpleSC 安装服务?
我知道语句:
SimpleSC::InstallService [name_of_service] [display_name] [service_type][start_type] [binary_path] [dependencies] [account] [password]
我已经尝试过了,但没有用:
SimpleSC::InstallService "LprService" "LprService" "272" "2" "$INSTDIR\GeneteLPRService.exe" "Dependencies" "" ""
P.s.: 使用InstallUtil.exe,有效
SimpleSC 依赖项是在您的服务启动之前必须启动的其他服务的列表。
The Wiki page有个例子:
; Depends on "Windows Time Service" (w32time) and "WWW Publishing Service" (w3svc):
SimpleSC::InstallService "MyService" "My Display Name" "16" "2" "$InstDir\MyService.exe" "w32time/w3svc" "" ""
Pop [=10=]
如果您没有任何服务依赖项,那么您可以像其他未使用的参数一样使用空字符串。
您的服务需要的文件可以File
或File /r
正常安装。