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

Popular Categories

How to create and delete a window service from CMD?

+13 votes
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 952 views
+2 votes
1 answer 224 views
+3 votes
1 answer 912 views
+6 votes
2 answers 3,587 views

Not a Member yet?

Ask to Folks Login

My Account
298 Folks are online
1 members and 297 guest online
Your feedback is highly appreciated