Re: SCM (Service Control Manager) output...




Blue Streak wrote:
Okay, I'm confused.

I am working with MSDE 1.0 (v 7.00) and MSDE 2000 (v 8.00) and the SCM
utility. When I run the command "scm" I get a help screen with many of
the different options available. For instance, if I were to type the
command "scm -action 3" it will return an exit code to indicate if the
MS-SQL server is running or not, "1" for TRUE and "-1" for FALSE.

I ran the following VBScript:
Set oShell = CreateObject("WScript.Shell")

If (oShell.Environment("PROCESS")("OS") = "Windows_NT") Then
Set oProg = oShell.Exec("scm -action 3 -service mssqlserver -silent
1")
Else
Set oProg = oShell.Exec("scm -action 3 -silent 1")
End If


Do While oProg.Status = 0
WScript.Sleep 100
Loop

WScript.Echo "Return code was: " & oProg.ExitCode

I get the exit code "1056" when the service is paused or running.
I get "1062" when it is stopped.

Hunh!?!
Last time I checked 1062 is not equal to -1 and 1056 is not 1.
What gives?

Is this because I am running WinXP-SP2 instead of Win9x?

To answer my own question:

1056 / 1062 are from NT-based O/S
-1 / 1 are from 9x-based O/S

.



Relevant Pages

  • SCM (Service Control Manager) output...
    ... command "scm -action 3" it will return an exit code to indicate if the ... I get the exit code "1056" when the service is paused or running. ... Is this because I am running WinXP-SP2 instead of Win9x? ...
    (microsoft.public.sqlserver)
  • Re: How to set exit code of non-console app?
    ... NOT yet returned an exit code to Windows (even though it has returned ... control to the command prompt, ... behavior does NOT occur if executing within a command script."). ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: "FFIND" Exit Codes?
    ... || and to issue exit code `0' if it finds any, `1', if it does not. ... | IF ERRORLEVEL 1 GOTO NO-NEW-FILES ... | Could someone provide the syntax to check the FFIND exit codes as ... FFIND is an internal command. ...
    (comp.os.msdos.4dos)
  • Re: Deploy Adobe Acrobat 6.0 using sms 2003
    ... >I tried to install Adobe Acrobat 6.0 using sms 2003 without much luck. ... > "This is what I put in my sms package command line: ... A failure exit code of 1624 was returned. ...
    (microsoft.public.sms.swdist)
  • RE: office 2003 deployment - too general of a error message
    ... I have the transform in the same directory as the package. ... I have the command line as follows ... A failure exit code of 1624 was returned. ... Systems Management Server (SMS) determines status for each ...
    (microsoft.public.sms.swdist)

Loading