To delete a service in Windows, use the following command-line syntax from admin Command Prompt: sc delete servicename Where servicename refers to the short name or the key name of the service, instead of its display name.To find the short name, open Services MMC and double-click a service. Sc stop Service name sc delete service name Run Command prompt as an administrator and execute above commands. Enclose the service name in double quotes if it contains spaces.
- Remove Windows Service Command Line
- Uninstall Windows Service Command Line C#
- Uninstall Windows Service Command Line Windows 7
- Uninstall Windows Service Command Line 7
Sometimes we will have to uninstall a program or software in automated way which does not require any user interaction. We can use
wmic product
command in such scenarios. Below you can find the syntax and also few examples.Below is the command we need to use to uninstall a program.
Note that you need to provide accurate program name along with the version if it’s part of the program name.
wmic product get
lists all the installed programs in the command prompt. You can use findstr command in combination with wmic command.Below are few examples for uninstalling different programs.
Uninstall Java SDK/JDK from command prompt
First you need to find the version of the Java installed on the system.
Windows 7 for gaming. I have above versions of JDK on my system. Let’s say we want to uninstall ‘Java 7 Update 79 (64-bit)’
Uninstall MySql server from command prompt
You can use the below command to install Mysql server 5.5
For example to get the program name for mysql you can use the below command.
Uninstall web folders
This wmic command should be run from eleavated administrator command prompt. Otherwise, it throws up an error like below.
If you get the error
No Instance(s) Available
, it means that there’s no such product installed on your system. Double check if you have got the product description accurately.Remove services from the list in the services.msc utility in Microsoft Windows with one of these two options.
Option 1 – Command
- You can also remove services using a command line. Hold down the Windows Key, then press “R” to bring up the Run dialog.
- Type “SC DELETE servicename“, then press “Enter“.
Remove Windows Service Command Line
“servicename” should be the exact name of the service.
Option 2 – Registry
- Hold down the Windows Key and press “R“.
- Type “regedit“, then select “OK“.
- Navigate to the following location in the registry:
- HKEY_LOCAL_MACHINE
- System
- CurrentControlSet
- Services
- There are folders under “Services” that contain each service. The “DisplayName” values in each of these folders equals the Service Name. Go through the list or use the “Edit” > “Find” menu to search for the service you wish to remove.
Uninstall Windows Service Command Line C#
FAQ
These steps only delete the name of the service. How do I delete the actual program that is running as a service?
Uninstall Windows Service Command Line Windows 7
You can track it down with these steps:
- Right-click the taskbar and choose “Task Manager“.
- Select the “Services” tab.
- Right-click the service you wish to delete, then choose “Go to details“.
- The process related to the service is highlighted. If you wish to remove it, you can track it down by right-clicking it and selecting “Open file location“. From there, either uninstall the related program from “Add/Remove Programs” or delete the EXE file as desired.