Quantcast
Channel: IgNiTeD SoUL » Logon Script with Shell
Viewing all articles
Browse latest Browse all 10

Checking for Remote Access

$
0
0


Determining whether a client is logging in through the network or remote access helps you specify which parts of the script to run. CheckRAS is a command-line, SMS resource kit utility to determine whether a user is using remote access. To determine whether the current user is using remote access during a logon script, proceed as follows:

  1. Create a new directory to store all files included in this example.
  2. Select Start|Run and enter “scriptfile.bat.”

Here, scriptfile is the full path and file name of a script file that contains the following:

@Echo Off

CLS ; Clears the screen

Set RAS=NO

fullpath\CheckRAS > Nul

If %errorlevel% EQU 1 Set RAS=YES

Here, fullpath is the full path where the CheckRAS utility is located, and RAS indicates whether the current user is using remote access or not.



Viewing all articles
Browse latest Browse all 10

Trending Articles