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,190 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 739 views
0 votes
0 answers 436 views
+2 votes
1 answer 145 views
+3 votes
1 answer 677 views
+2 votes
2 answers 791 views
+6 votes
2 answers 2,442 views
+5 votes
7 answers 14,605 views
+2 votes
1 answer 1,263 views

Not a Member yet?

Ask to Folks Login

My Account
611 Folks are online
85 members and 526 guest online
Your feedback is highly appreciated