473,395 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How to uninstall NT Service

Jin
Hello..

I installed two NT services:
1, servicename: service1; it runs c:\test\myservice.exe without
dependency
hService = ::CreateService(hSCM,
m_szServiceName,
m_szServiceName,
SERVICE_ALL_ACCESS,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_DEMAND_START, // start condition
SERVICE_ERROR_NORMAL,
szFilePath,
NULL,
NULL,
NULL,
NULL,
NULL);
2, servicename: service2; it runs c:\test\myservice.exe depending on
MSSQLSERVER
hService = ::CreateService(hSCM,
m_szServiceName,
m_szServiceName,
SERVICE_ALL_ACCESS,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_DEMAND_START, // start condition
SERVICE_ERROR_NORMAL,
szFilePath,
NULL,
NULL,
"MSSQLSERVER\0"
NULL,
NULL);

I made a mistake that I installed the service2 before uninstalling
service1. Before I installed service2, I can install/uninstall
service1 successfully. After I installed the service2, I could not
delete the service1(my code calls DeleteService(hService)).

Is there any way I can delete the service1, like modifying the
register file?

Thank u

Best Jin
Jul 22 '05 #1
1 1849
"Jin" <te****@hotmail.com> wrote...
I installed two NT services:
[...]

I made a mistake [...]

Is there any way I can delete the service1, like modifying the
register file?


Please ask in a newsgroup dedicated to your OS. Your question has
absolutely NOTHING to do with C++ _language_, the _only_ topic of
this newsgroup. I suggest comp.os.ms-windows.programmer.win32.

V
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Matt Frame | last post by:
I wrote a small assembly to test the process of placing it into the Global Assembly Cache but now I cannot remove it. When I hi-light and click delete I get the following: Assembly 'Assembly...
6
by: tuuky | last post by:
I've created a Windows Service in C# and an installer project for it. I installed the service using the packaged installer project and the service was installed correctly and it runs fine. ...
0
by: Daniel Pratt | last post by:
(originally posted to microsoft.public.dotnet.framework) Hi All, I have a Windows Service project that contains an "Installer" class that is used to install and uninstall the service. The...
3
by: Henry Seymour | last post by:
I've developed a .Net Windows Form application and used the Click-Once Deployment. In that application I would like to allow the user a click-once method of uninstalling it. I do not find an...
1
by: mwolf | last post by:
I have a setup project that installs a windows service. Including a custom action to write a config file. It installs just fine, but when i go to test the uninstall via the windows add/remove...
3
by: Marcel Brekelmans | last post by:
Hi, I was wondering if it's possible to install/uninstall a service from code without using the InstalUtil.exe tool with the /i and /u flags. As far as I can Google everyone is doing it that...
3
by: DC | last post by:
Hi, I have developed a windows service in C# and I am using a Visual Studio 2003 installer to install it. When I am updating the service, I usually stop the service in control panel, close...
1
by: John A Grandy | last post by:
I have a server with a custom .NET Windows Service installed. The folder containing the service's .exe and .dll files is long gone. I need to uninstall the service. InstallUtil.exe /u...
4
by: UJ | last post by:
How could I have a program uninstall a service and then install a newer version of the same service? This assumes I've already got the files in the appropriate directory to be able to install the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.