简体   繁体   中英

How send messages to executed windows service C#

I have developed windows service on C# .Net 4.0. Can I send command message to executed service to reload config or other custom actons? In Unix Redhat systems I can use command prompt for it. How I can do same in Windows Services without restart service?

You can do it by command line with net stop and net start or

Read this C# article on playing with services direct which outlines how to use the "servicecontroller" to do just that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM