cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jchfeng
Level 4

Error when Register a Window service

I'd like to register a window service by Action "Register Window Service", For the "Executable to Register as window service", for example, if I set it as $USER_INSTALL_DIR$\xyz.exe, the service can be registered successfully. but if I want add an argument for the executable, such as $USER_INSTALL_DIR$\xyz.exe $USER_INSTALL_DIR$\abc.config, then there are below error in log:

Additional Notes: NOTE - Unable to locate executable to register as NT service. Deferring...

Then how can I register a service which use an executable with argument?
Labels (1)
0 Kudos
(2) Replies
greenaj
Level 3

You may want to enclose the arguments in quotes if there is a space in the path.
0 Kudos
jchfeng
Level 4

greenaj wrote:
You may want to enclose the arguments in quotes if there is a space in the path.


Then it should be "$USER_INSTALL_DIR$\xyz.exe $USER_INSTALL_DIR$\abc.config"? or "$USER_INSTALL_DIR$\xyz.exe" "$USER_INSTALL_DIR$\abc.config"?

I tried, If I use $USER_INSTALL_DIR$\xyz.exe, the service can be registerred successfully, but $USER_INSTALL_DIR$\xyz.exe abc.config will fail.
0 Kudos