Hey there! any question in your mind? Ask It Now!.

Popular Categories





How to create and delete a window service from CMD?

+13 votes
1,199 views
asked in Programming by amit (370 points)
retagged by Bhartesh
I want to create a window service from CMD and also want to delete old service of my application.

2 Answers

+1 vote
answered by Himanshu Expert (5,940 points)
selected by amit
 
Best answer

its very simple For cretion of a service from cmd , write these command in CMD

sc create MySystemCmdBox binPath= "C:\windows\system32\cmd.exe /k cmd" type= own type= interact error= ignore start= demand

Here MySystemCmdBox  is service name 

C:\windows\system32\cmd.exe = path of executable 

For delete a service form CMD

sc delete MySystemCmdBox 

then execute.

NOTE : you should open cmd with run as Administrator

 

commented by amit (370 points)
Thanks himanshu!
+1 vote
answered by aafCZDx
edited by Himanshu
Nice its working, I also used the same for deleting my windows apache services. Thanks man!

Related Questions

+1 vote
1 answer 746 views
0 votes
0 answers 447 views
+2 votes
1 answer 153 views
+3 votes
1 answer 714 views
+2 votes
2 answers 796 views
+6 votes
2 answers 2,574 views
+5 votes
7 answers 14,684 views
+2 votes
1 answer 1,316 views

Not a Member yet?

Ask to Folks Login

My Account
628 Folks are online
2 members and 626 guest online
Your feedback is highly appreciated