Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

What Don't I Understand About @SERVICE

Jan
40
0
In:
TCC 10.00.67 Windows XP [Version 5.1.2600]
TCC Build 67 Windows XP Build 2600 Service Pack 3
Registered to Carl Johnson - 1 System License

I'm trying to use @SERVICE to (initially) check if a service is running or not. First I issued a SERVICES command with the following result:
[C:\]services MSSQL$SQLX2005_I0
MSSQL$SQLX2005_I0 (SQL Server (SQLX2005_I0)) Running

Then I issued the following @SERVICE command but the result doesn't look anything like what the Help documents:
[C:\]ECHO %@SERVICE[MSSQL$SQLX2005_I0,2]
5898240

[C:\]ECHO %_?
0

Info 2 is supposed to give the "current state of the service", but I get the same result whether or not the service is running or stopped. What am I doing wrong?

Carl
 
On Sat, 09 May 2009 19:24:58 -0500, BitPusher <> wrote:

|Then I issued the following @SERVICE command but the result doesn't look anything like what the Help documents:
|[C:\]ECHO %@SERVICE[MSSQL$SQLX2005_I0,2]
|5898240
|
|[C:\]ECHO %_?
|0
|
|Info 2 is supposed to give the "current state of the service", but I get the same result whether or not the service is running or stopped. What am I doing wrong?

None of it makes much sense:

for /L %i in (1,1,5) echo %@service[lanmanworkstation,%i]
7471215
2097259
7274601
7471184
6881390
--
- Vince
 
try start/stop/query, 2 is not supported

Usage: @SERVICE[[\\MACHINE,]servicename,[query|start|stop]]

e.g:

echo %@service[MSSQL$MSSMLBIZ,query]
Running

echo %@service[MSSQL$MSSMLBIZ,start]
MSSQL$MSSMLBIZ failed.

echo %@service[MSSQL$MSSMLBIZ,stop]
Stop service MSSQL$MSSMLBIZ request sent.

echo %@service[MSSQL$MSSMLBIZ,start]
Start service MSSQL$MSSMLBIZ request sent.

echo %@service[MSSQL$MSSMLBIZ,query]
Start Pending


echo %@service[MSSQL$MSSMLBIZ,query]
Running

HTH
- Federico




________________________________
From: BitPusher <>
To: [email protected]
Sent: Saturday, May 9, 2009 5:24:46 PM
Subject: [Support-t-1138] What Don't I Understand About @SERVICE

In:
TCC 10.00.67 Windows XP [Version 5.1.2600]
TCC Build 67 Windows XP Build 2600 Service Pack 3
Registered to Carl Johnson - 1 System License

I'm trying to use @SERVICE to (initially) check if a service is running or not. First I issued a SERVICES command with the following result:
[C:\]services MSSQL$SQLX2005_I0
MSSQL$SQLX2005_I0 (SQL Server (SQLX2005_I0)) Running

Then I issued the following @SERVICE command but the result doesn't look anything like what the Help documents:
[C:\]ECHO %@SERVICE[MSSQL$SQLX2005_I0,2]
5898240

[C:\]ECHO %_?
0

Info 2 is supposed to give the "current state of the service", but I get the same result whether or not the service is running or stopped. What am I doing wrong?

Carl
 
try start/stop/query, 2 is not supported

Usage: @SERVICE[[\\MACHINE,]servicename,[query|start|stop]]

e.g:

echo %@service[MSSQL$MSSMLBIZ,query]
Running

echo %@service[MSSQL$MSSMLBIZ,start]
MSSQL$MSSMLBIZ failed.

echo %@service[MSSQL$MSSMLBIZ,stop]
Stop service MSSQL$MSSMLBIZ request sent.

echo %@service[MSSQL$MSSMLBIZ,start]
Start service MSSQL$MSSMLBIZ request sent.

echo %@service[MSSQL$MSSMLBIZ,query]
Start Pending

echo %@service[MSSQL$MSSMLBIZ,query]
Running

HTH
 
On Sat, 09 May 2009 21:22:49 -0500, fromano <> wrote:

|try start/stop/query, 2 is not supported
|
|Usage: @SERVICE[[\\MACHINE,]servicename,[query|start|stop]]

That's nothing like TCC's help suggests. And it doesn't work here:

echo %@service[lanmanworkstation,query]
lanmanworkstation,query

sc query lanmanworkstation

SERVICE_NAME: lanmanworkstation
TYPE : 20 WIN32_SHARE_PROCESS
STATE : 4 RUNNING
(STOPPABLE,PAUSABLE,ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
--
- Vince
 
Sorry, forgot to mention that if he's using FedUtils9 that's the syntax, if he doesn't have FedUtils9 plugin installed then I don't know
 
I'm just using "plain" TCC - no plugins.

I suspect that either the Help for @SERVICE need major work or that this is a bug.

Carl
 
Need help index entry for @SERVICE

In:
TCC 10.00.67 Windows XP [Version 5.1.2600]
TCC Build 67 Windows XP Build 2600 Service Pack 3
Registered to Carl Johnson - 1 System License

I'm trying to use @SERVICE to (initially) check if a service is running or not.


I was unfamiliar with that function so I tried to look it up in the help file.

Rex, there's no index entry for @SERVICE, but there is a link to the @SERVICE page from the functions by category page.
 
for /L %i in (1,1,5) echo %@service[lanmanworkstation,%i]
7471215
2097259
7274601
7471184
6881390
--
- Vince

I get exactly the same values, regardless of the service:
for /l z in (1,1,5) echo %z - %@service[nncron,%z]
1 - 7471215
2 - 2097259
3 - 7274601
4 - 7471184
5 - 6881390
--
Peter
 
This is a "bump" of my OP since I haven't seen any "official" reply to this issue.

Since the new @SERVICE function was one of the three reasons I upgraded from V9 to V10, I would like to have it fixed or the documentation updated to describe how to make it work.

Carl
 
Back
Top
[FOX] Ultimate Translator
Translate