What Don't I Understand About @SERVICE

Jan 9, 2009
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
 
May 20, 2008
11,285
95
Syracuse, NY, USA
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
130
1
CA
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
130
1
CA
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
 
May 20, 2008
11,285
95
Syracuse, NY, USA
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
130
1
CA
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
 
Jan 9, 2009
40
0
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
 
May 29, 2008
565
4
Groton, CT
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.
 
Jul 1, 2008
81
0
74
Montreal
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
 
Jan 9, 2009
40
0
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
 
Similar threads
Thread starter Title Forum Replies Date
vefatica Unicode ... I don't understand Support 1
M An issue I really don't understand and is too long and detailed for this "Title" line... Support 16
R Bug TPIPE's pdf to text conversions don't work Support 2
vefatica Console popup windows don't work correctly Support 0
M Backquoted parameters used in GoSub don't pass string as a single parameter Support 2
V Ctrl-Home/End don't work in Win10 Support 3
vefatica Documentation Help: links to "Conditional expressions" don't work Support 2
RChrismon How to? Changes to Options Don't Save Support 8
MickeyF WAD 'if' and aliases don't mix so well Support 5
D How to? V15.00.30 -(help!) - Floating view windows don't open Support 1
vefatica Backquotes, aliases get 'em, BTMs don't? Support 1
D Automatic directory changes don't work at all Support 4
W redirection with pipe don't work Support 10
vefatica @PID, ISAPP - don't see system processes Support 12
J Fixed IDE search keys don't work in TCMD 13.01.32 Support 3
vefatica =~ ... still don't get it Support 4
vefatica "Administrator:" - I don't want to see it Support 0
C NTFS Descriptions don't work? Support 3
R Don't wake up external drives on startup Support 2
S Responding to a problem for me that I totally do not understand Support 3
A Installers delete EVerything service if already installed Support 0
CWBillow Everything as a service Support 2
R Everything service locking thumb drives Support 1
Steve Pitts Insufficient system resources exist to complete the requested service Support 1
vefatica @SERVICE, unexpected results Support 6

Similar threads