Creating Windows service without Visual Studio

前端 未结 4 716
醉话见心
醉话见心 2021-02-04 15:10

So creating a Windows service using Visual Studio is fairly trivial. My question goes a bit deeper as to what actually makes an executable installable as a service & how to

4条回答
  •  孤独总比滥情好
    2021-02-04 16:03

    I know I'm a bit late to the party, but I've recently had this same question, and had to struggle through the interwebs looking for answers.

    I managed to find this article in MSDN that does in fact lay the groundwork. I ended up combining many of the files here into a single exe that contains all of the commands I need, and added in my own "void run()" method that loops for the entirely life of the service for my own needs.

    This would be a great start to someone else with exactly this question, so for future searchers out there, check it out:

    The Complete Service Sample http://msdn.microsoft.com/en-us/library/bb540476(VS.85).aspx

提交回复
热议问题