Windows system uses the cmd command to install and uninstall the service

  

Method 1

1, Start -> Run -> cmd.

2, cd to C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727 (Framework version number is configured by IIS).

3, installation service: Run the command line InstallUtil.exe E: /test.exe; uninstall service: Run the command line InstallUtil.exe -u E: /test.exe; this can be deleted, but if If you can't delete it, it doesn't matter if there is another way.

Method 2

Run-->cmd--> to c:\\windows
\\system32 folder-->Enter sc delete <service Name >, then you can uninstall the service. At this time, we can use another command to uninstall, as follows: C:\\WINDOWS\\system32>sc delete MyService.

The MyService is the name of your service. Its uninstall command can be written as follows: sc delete "service name" Of course you can also use this tool to create, start, stop services. For example, we can use the following command to install the service and start the service. installutil HongjunGuo.JobsWindowsService.exe, sc start " service name "



Copyright © Windows knowledge All Rights Reserved