Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install a service on windows 7 without Visual Studio?

Install a windows service: there is a util with Visual Studio: InstallUtil.exe. If I have a service MyService.exe and want to install it on a windows 7 without Visual Studio on it, how can I install it?

like image 733
KentZhou Avatar asked Nov 28 '22 16:11

KentZhou


1 Answers

One way is to use sc.exe, which is part of OS. Example:

sc create **ServiceName** start= auto binPath= "c:\mydir\myService.exe"

where binPath is exe file containing your service.

if you don't want start type = automatic then you can use net start and net stop command on command line of windows to start and stop service respectively.

like image 73
seva titov Avatar answered Dec 09 '22 18:12

seva titov