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,188 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 734 views
0 votes
0 answers 432 views
+2 votes
1 answer 141 views
+3 votes
1 answer 643 views
+2 votes
2 answers 788 views
+6 votes
2 answers 2,240 views
+5 votes
7 answers 14,590 views
+2 votes
1 answer 1,241 views

Not a Member yet?

Ask to Folks Login

My Account
863 Folks are online
82 members and 781 guest online
Your feedback is highly appreciated