Add Or Remove Window Services Using C#.net

Posted by Naraayanan under C# on 11/11/2012 | Points: 10 | Views : 1333 | Status : [Member] | Replies : 2
Hi All,
How to Add Or Remove Window Services Using C#.net?
In my Application , I have One Check Box:
If Check Box Checked: Add Window Services .
Check Box Unchecked: Remove Window Services .@ Run Time.

How to Open Service window?
Go To Run Screen
Type :services.msc

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/



Responses

Posted by: Krv on: 11/15/2012 [Member] Starter | Points: 25

Up
0
Down
a. You have to use
installutil 
to install/ remove windows services created using .NET
b. In your code, during the checked changed event, run the cmd prompt/ Bat file with
the instsallutil
and pass the windows services exe path and install (-i) or uninstall (-u) command

Thanks,
R.Vasanth
MCTS(SQL Server & BI)
http://bigdatatech.blogspot.com

Naraayanan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 11/16/2012 [Member] Starter | Points: 25

Up
0
Down
HI Vasanth,
Thanks .can you give me an Example for this task?


Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Naraayanan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response