|
-
Nov 17th, 2004, 07:32 PM
#1
Thread Starter
Frenzied Member
Can I remove a service in the registry?
Is there any way to remove a service using the registry?
I have a program in VB 6 that starts up with the registry. Then in the program you can select to have it start as a service instead and it automatically clears the reg key in startup.
My problem is when I do an update or another install, it still adds to the registry for startup. If its already set to start as a service, thats my problem. My installer cannot support checking this.
So I want to delete the service in the registry with my installer and just let them reset it to a service later if needed when they re-install/upgrade.
Thanks!
-
Nov 17th, 2004, 07:43 PM
#2
how about NET STOP ?
this will stop the service if it's running. couldn't your program just delete the key, with error checking to check if it was not there?
Last edited by dglienna; Nov 18th, 2004 at 04:56 AM.
-
Nov 18th, 2004, 05:30 PM
#3
Retired VBF Adm1nistrator
You should be able to delete straight from:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Nov 19th, 2004, 02:07 PM
#4
Originally posted by plenderj
You should be able to delete straight from:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
Is that true for all Windows OS's?
-
Nov 19th, 2004, 07:45 PM
#5
Fanatic Member
I was under the impression it was:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Run
-
Nov 19th, 2004, 09:51 PM
#6
Originally posted by cid
I was under the impression it was:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Current Version\Run
That is where programs get loaded once a user logs in.
A service is started before that - when the OS is loaded and before anyone logs in.
-
Nov 21st, 2004, 02:06 AM
#7
Originally posted by plenderj
You should be able to delete straight from:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
As far as I'm aware, this approach should work with all OSes, though the 98 range may not actually use them.
Please be aware, editing information in this section is very dangerous, deleting incorrect keys can cause your computer to stuff up completly, as most of the services are Windows ones anyway.
I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|