How to install or uninstall a windows service?



How to install or uninstall a windows service?..

Answer / Archishman

To install or uninstall a Windows service, you can use the `sc.exe` command in the Command Prompt:nnInstall Service:n```cmdnsc create MyService binPath= "C:MyService.exe" displayName= "My Service" start= auto"n```nReplace `MyService` with your service name and `C:MyService.exe` with the path to your service executable.nnUninstall Service:n```cmdnsc delete MyService /f"n``` - The `/f` option forces deletion even if other services depend on it.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

how encapsulation is implemented in c#

1 Answers   Cognizant,


Can you instantiate a struct without using a new operator in c#?

1 Answers  


What?s an abstract class?

5 Answers   Siebel,


Can a constructor have a return type?

1 Answers  


can we create an empty interface with no definitions? If so, how it should be called in the class?

3 Answers   IBM,


How to Show Message box in Metro Style App?

1 Answers   PUCIT,


What is array and arraylist?

1 Answers  


What are cookies in c#?

1 Answers  


What is array collection?

1 Answers  


Which framework is best for desktop application?

1 Answers  


What is the usage of transponders?

1 Answers   Wipro,


How do I make a dll in c#?

1 Answers  


Categories