What Don't I Understand About @SERVICE

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Jan 9, 2009
40
0
#1
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
 
#2
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
 
May 20, 2008
110
0
CA
#3
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: fromano@pacbell.net
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
 
May 20, 2008
110
0
CA
#4
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
 
#5
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
 
May 20, 2008
110
0
CA
#6
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
 
May 29, 2008
516
3
Groton, CT
#8
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.
 
Jan 9, 2009
40
0
#10
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