I wish to use the rascheck.exe utility in a login script to determine if users are connecting via ras. If I run the checkras from the commandline of a ras client it returns "CHECKRAS: 1 connections" to the screen. If I run checkras as part of the following script RAS returns the value of 0 which is the error code.
'------------------------------------------------
Set ws = CreateObject("WScript.Shell"
LogonServer = ws.ExpandEnvironmentStrings("%LOGONSERVER%"
CheckRasExe = (LogonServer & "\netlogon\checkras.bat"
RAS = ws.Run(CheckRasExe)
wscript.echo RAS
'------------------------------------------------
I wish to return the value that checkras outputs to the commandline to a variable in my script. How can I achieve this ?
'------------------------------------------------
Set ws = CreateObject("WScript.Shell"
LogonServer = ws.ExpandEnvironmentStrings("%LOGONSERVER%"
CheckRasExe = (LogonServer & "\netlogon\checkras.bat"
RAS = ws.Run(CheckRasExe)
wscript.echo RAS
'------------------------------------------------
I wish to return the value that checkras outputs to the commandline to a variable in my script. How can I achieve this ?