Re: SCM (Service Control Manager) output...
- From: "Blue Streak" <rdlebreton@xxxxxxxxxxx>
- Date: 1 Jan 2007 21:03:33 -0800
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
.
- Prev by Date: Re: How to convince my customer to use SQL2005 instaed of Oracle10g
- Next by Date: Creating relationship between views
- Previous by thread: Re: How to convince my customer to use SQL2005 instaed of Oracle10g
- Next by thread: Creating relationship between views
- Index(es):
Relevant Pages
|
Loading