|
Answer» I am trying to figure out a service name for a TCI VT100 Service so I can NET STOP and NET START it to allow the USERS reset the service through a batch file SHORTCUT on their desktop.
I was wondering if anyone knew of a way to find the service name such as when looking at the print spooler it doesnt tell you that you can execute NET STOP SPOOLER to stop the service and NET START SPOOLER to start the print service back up. When you look at the services Properties you would see that it is pointing at C:\WINDOWS\system32\spoolsv.exe ..... so somewhere the system knows that SPOOLER = spoolsv.exe for the service.
I am trying to find it for TCI VT100 and I tried a bunch of combinations of trial and error on hoping I would find the declaration that will match the service.
So I am here asking if anyone knows of a way to find the actual service name so I can NET STOP and NET START That TCI VT100 service?
THANKS No guarantees, but this little script may help you match up the executable with the service name.
Code: [Select]On Error Resume Next strComputer = "."
Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Service", "WQL", _ wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems WScript.Echo "" WScript.Echo "StartName: " & objItem.StartName WScript.Echo "PathName: " & objItem.PathName Next
Save the script with a vbs extension and RUN from the command prompt as CSCRIPT scriptname.vbs
To make it easier to read, you can also redirect the output of cscript to a file.
Good luck.
EDIT: research turned up the service name as the target of a start/stop command.
|