Add a new Windows Service

• Download Windows Resource Kit Tools from Official Microsoft Download Center

https://www.microsoft.com/en-us/download/details.aspx?id=17657

 

• Run the registry script

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\moiersvc]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\moiersvc\Parameters]
"Application"="c:\\ProAgentAddon\\bin\\StatusQuery.exe"

 

• Run the bat script

c:\ProAgentAddon\bin\instsrv.exe moiersvc c:\ProAgentAddon\bin\srvany.exe
sc config moiersvc DisplayName= "ProFlex3 Function Query"
sc description moiersvc "Query ProFlex3 function status at regular basis and write messages when function status is changed."

 

• Run the command "net start moiersvc"

 

posted @ 2018-05-31 11:47  天体风雪  阅读(183)  评论(0)    收藏  举报