Install a .NET windows service without InstallUtil.exe

when i was in client place I got a problem

I need to install a windows service using installutil.exe but there is no visual studio command prompt tool.

http://dotnetstep.blogspot.sg/2009/06/install-window-service-without-using.html

c:\windows\system32\\

sc create ServiceName binPath= “c:\windowservice1\windowservice1.exe”

here ServiceName is userdefined name it can be anything

When creating the service there is a space between the = and ”

ie after binPath= provide a space

Deleting a windows service from command prompt

sc delete ServiceName

Install window service without using installutil

Article is about to install window service without using InstallUtil utility.
Windows XP or Later has command line utility called sc . (This utility talks with service controller and with services from command line).
SC is a window base utility. AS explain in article http://dotnetstep.blogspot.com/2009/06/install-windowservice-using-installutil.html sc does not required ProjectInstaller.

1. Start service using sc
sc start ServiceName

2. Stop serivce
sc stop ServiceName

3. Delete window service
sc delete servicename
Note : During delete call if service is in running state then service is delete when nexttime service is stop or PC restart.

4. Create window service
sc create ServiceName binpath= “c:\windowservice1\windowservice1.exe”

Apart from above many option available . For that just go to command prompt and type sc create /?

For example configure service running account.

sc create servicename binpath= “c:\windowservice1\windowservice1.exe” obj= administratorpassword= pass

 

 

References:

 

watching files in folder console application c#

http://www.codecandle.com/articles/csharp/io/filesystemwatcher-monitoring-the-file-system-events-with-filesystemwacher-class-instance.html

http://www.codeproject.com/Articles/26528/C-Application-to-Watch-a-File-or-Directory-using-F

http://www.csharptutorial.in/2013/04/Csharp.Net-How-To-Monitor-Directory-and-files-using-Csharp-FileSyestemWatcher.html#.UqndUfT6Re4

http://devproconnections.com/net-framework/how-build-folder-watcher-service-c

How to Open Windows Task Scheduler (control panel->administrative tools->task schedulter in windows7)

http://www.dummies.com/how-to/content/how-to-open-windows-task-scheduler.html

http://msdn.microsoft.com/en-us/library/9aackb16(v=vs.110).aspx
debug windows service c# visual studio 2008

http://www.sarin.mobi/2008/08/c-windows-service-visual-studio-2008/

http://mindstick.com/Articles/fd4971ba-7e48-4f1a-9aa1-621748a98e9f/?Windows%20Service
http://www.c-sharpcorner.com/UploadFile/prvn_131971/DebuggingWindowsServices02062006014001AM/DebuggingWindowsServices.aspx

from vs command prompt
C:\Windows\system32>installutil -u E:\Projects\HimalayaPhase2\Phase2\AutoRecManP
rocess\FileWatcherWindowsService\bin\Debug\FileWatcherWindowsService.exe

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: