How to find out if service is installed (nof: if running !)

  • Thread starter Thread starter Frank Callone
  • Start date Start date
F

Frank Callone

How do I find out from Command line if a service with the name e.g. "xxyyzz" is currently installed ?

Note that the question is NOT if the service is currently running. It could be stopped.

But in must be installed.

If I type

net start

only the installed AND running services are listed.

What is the command line command for service installation detection ?
It should be applicable under WinXP AND Win2000.

Frank
 
Type: sc query xxyyzz

xxyyzz must be the Service name *not* the Display name.

Type: sc /? for help.

Open Services...
Start | Run | Type: services.msc | Click OK |
Scroll down to and double click the service |
On the General tab, Service name: take note of the Service Name not the
Display Name | Close Services

Opening Services, like above will also tell you if the service is installed.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services will also tell you if
the service is installed.

SC
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sc.mspx

Start | Run | Paste the following line and click OK...

hh ntcmds.chm::/sc.htm

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Frank Callone said:
How do I find out from Command line if a service with the name e.g.
"xxyyzz" is currently installed ?
Note that the question is NOT if the service is currently running. It could be stopped.

But in must be installed.

If I type

net start

only the installed AND running services are listed.

What is the command line command for service installation detection ?
It should be applicable under WinXP AND Win2000.

Frank

You could use this command:

srvinfo \\%Computername%. It comes with the Technical Resource
Kit Professional. Its output looks like this:

Services:
[Stopped] Alerter
[Stopped] Application Management
[Stopped] Background Intelligent Transfer Service
[Running] Computer Browser
[Running] CAISafe
[Stopped] Indexing Service
[Stopped] ClipBook
[Running] DynDNS-Updater
[Running] DHCP Client
[Stopped] Logical Disk Manager Administrative Service
[Running] Logical Disk Manager
[Running] DNS Client
[Running] Event Log
[Running] COM+ Event System
[Stopped] Fax Service
[Running] Server
[Running] Workstation
[Running] TCP/IP NetBIOS Helper Service
[Stopped] TCP/IP Print Server
[Running] Messenger
[Stopped] NetMeeting Remote Desktop Sharing
 
Open up the registry editor and go to;

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

All services installed are listed here.
 
sc query "xxyyzz"

You can get sc.exe (service controller tool) here.
ftp://ftp.microsoft.com/reskit/win2000/sc.zip

sc.exe natively exists in Windows XP Professional

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| How do I find out from Command line if a service with the name e.g.
"xxyyzz" is currently installed ?
|
| Note that the question is NOT if the service is currently running. It
could be stopped.
|
| But in must be installed.
|
| If I type
|
| net start
|
| only the installed AND running services are listed.
|
| What is the command line command for service installation detection ?
| It should be applicable under WinXP AND Win2000.
|
| Frank
|
 
Frank Callone said:
How do I find out from Command line if a service with the name e.g.
"xxyyzz" is currently installed ?

Here is a script that will list all the services and in what state the
service is in. Note if the Service is disabled, it will show as stopped.
After the script has run, it will create a file called "Services.txt" on
your Desktop. Name the file "Services.vbs" or download the file here

http://www.lprf.ca/files/services.vbs

Note: Some lines may wrap.
=====Begin Copy================
'List all Services and Service State
Set wshshell = CreateObject("Wscript.Shell")
Set fso = Wscript.CreateObject("Scripting.FilesystemObject")
nName = WshShell.SpecialFolders("Desktop")
nName = nName & "\Services.txt"
Set n = fso.CreateTextFile(nName, true)
n.writeline "List of all the services and their status"
n.writeline string(44,"~")
n.writeblanklines 1

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colRunningServices = objWMIService.ExecQuery("Select * from
Win32_Service")

For Each objService in colRunningServices
n.writeline objService.DisplayName & ": " & objService.State
n.writeblanklines 1
Next

======End Copy===============
 

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

Back
Top