Author Topic: TNServer as Windows service  (Read 3571 times)

mindlube

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 46
    • View Profile
TNServer as Windows service
« on: March 28, 2014, 02:54:25 PM »
Is it possible to run TNServer.exe as a windows service? Or what would be the best way to auto-start it at reboot? My Windows knowledge is pretty weak. Running Windows Server 2012 R2.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNServer as Windows service
« Reply #1 on: March 29, 2014, 06:30:16 AM »
Yes you can. TNServer.exe is a compiled executable with the source code that's provided for you in the zip file (ServerMain.cs).

The user input part is around line 210 in that file where it reads console input on line 213. You will want to get rid of that, putting a thread sleep in there instead.