Uninstalling a Windows Service

G

Guest

I have a windows service that want to un-install. When I run "installutil /u serivcename" I get the error that the serivce is not installed on my machine. However, when view the serivce console I still see my service there. What must be done to remove a windows service written in VB.Net from my system.

I'm trying un-install the service because I'm compiling it as a console application to perform debugging. I think it will be easier to debug. I have not been able to get the service running because of errors within my code. I know that I can debug a windows service however, you must first get things running to debug and I'm not at that point yet. For now I just want to un-install it and debug.

Thanks
 
G

Guest

Please see error message below:

C:\Documents and Settings\Louis\My Documents\Visual Studio Projects\AlertProcess
or\AlertProcessor\bin>installutil /u AlertProcessor.exe
Microsoft (R) .NET Framework Installation utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.



The uninstall is beginning.
See the contents of the log file for the c:\documents and settings\louis\my docu
ments\visual studio projects\alertprocessor\alertprocessor\bin\alertprocessor.ex
e assembly's progress.
The file is located at c:\documents and settings\louis\my documents\visual studi
o projects\alertprocessor\alertprocessor\bin\alertprocessor.InstallLog.
Uninstalling assembly 'c:\documents and settings\louis\my documents\visual studi
o projects\alertprocessor\alertprocessor\bin\alertprocessor.exe'.
Affected parameters are:
assemblypath = c:\documents and settings\louis\my documents\visual studio pro
jects\alertprocessor\alertprocessor\bin\alertprocessor.exe
logfile = c:\documents and settings\louis\my documents\visual studio projects
\alertprocessor\alertprocessor\bin\alertprocessor.InstallLog
Removing EventLog source AlertProcessor.
Warning: The source AlertProcessor is not registered on the local machine.
Service AlertProcessor is being removed from the system...
An exception occurred during the uninstallation of the System.ServiceProcess.Ser
viceInstaller installer.
System.ComponentModel.Win32Exception: The specified service does not exist as an
installed service
An exception occurred while uninstalling. This exception will be ignored and the
uninstall will continue. However, the application might not be fully uninstalle
d after the uninstall is complete.

The uninstall has completed.
An exception occurred while uninstalling. This exception will be ignored and the
uninstall will continue. However, the application might not be fully uninstalle
d after the uninstall is complete.

C:\Documents and Settings\Louis\My Documents\Visual Studio Projects\AlertProcess
or\AlertProcessor\bin>installutil /u AlertProcessor.exe
Microsoft (R) .NET Framework Installation utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.



The uninstall is beginning.
See the contents of the log file for the c:\documents and settings\louis\my docu
ments\visual studio projects\alertprocessor\alertprocessor\bin\alertprocessor.ex
e assembly's progress.
The file is located at c:\documents and settings\louis\my documents\visual studi
o projects\alertprocessor\alertprocessor\bin\alertprocessor.InstallLog.
Uninstalling assembly 'c:\documents and settings\louis\my documents\visual studi
o projects\alertprocessor\alertprocessor\bin\alertprocessor.exe'.
Affected parameters are:
assemblypath = c:\documents and settings\louis\my documents\visual studio pro
jects\alertprocessor\alertprocessor\bin\alertprocessor.exe
logfile = c:\documents and settings\louis\my documents\visual studio projects
\alertprocessor\alertprocessor\bin\alertprocessor.InstallLog
Removing EventLog source AlertProcessor.
Warning: The source AlertProcessor is not registered on the local machine.
Service AlertProcessor is being removed from the system...
An exception occurred during the uninstallation of the System.ServiceProcess.Ser
viceInstaller installer.
System.ComponentModel.Win32Exception: The specified service does not exist as an
installed service
An exception occurred while uninstalling. This exception will be ignored and the
uninstall will continue. However, the application might not be fully uninstalle
d after the uninstall is complete.

The uninstall has completed.
An exception occurred while uninstalling. This exception will be ignored and the
uninstall will continue. However, the application might not be fully uninstalle
d after the uninstall is complete.

C:\Documents and Settings\Louis\My Documents\Visual Studio Projects\AlertProcess
or\AlertProcessor\bin>
 
G

Greg Burns

The last time I had trouble uninstalling a service I wrote I had forgot to
stop it first...?

Greg
 
G

Guest

I have made sure that the service is stopped first. I continue to get the same error. Any help is greatly appreicated.

Thanks
 
G

Greg Burns

This is a (very) long shot, but once I had compiled and installed a service
with NET 1.0. Upgraded source code to NET 1.1 and tried to uninstall to
reinstall new version. Wouldn't do it. Solution was to installutil from
prior framework folder. I told you it was a long shot. :^)

Greg
 
D

David Williams , VB.NET MVP

Insure that the service will start (again). Assuming that the service
starts, then check the location that the service starts from. I have
seen this happen when I installed from one location and attempted to
stop from an another. I have also seen this when I changed the assembly
(in a different directory of course), stopped the service, copied the
changed (and now non-functional for any reason) assembly over the one
that the service is pointed to. In that case, I had to write a stub
service (with the same assembly name) that I could run and stop. This
allowed me to un-install the service.

HTH

David
 
C

Chris Dunaway

C:\Documents and Settings\Louis\My Documents\Visual Studio Projects\AlertProcess
or\AlertProcessor\bin>installutil /u AlertProcessor.exe
System.ComponentModel.Win32Exception: The specified service does not exist as an
installed service

I notice that you have added '.exe' to the end of the service name. Have
you tried by just using the service name and not the name of the executable
file? i.e. have you tried:

installutil /u AlertProcessor

Without the '.exe' on the end.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
G

Greg Burns

I hade made a batch file to install and uninstall my service for when I was
testing. It had the exe extension and always worked for me...

"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\installUtil.exe" /u
"C:\MyService\bin\MyService.exe"

Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top