Discussion Locked

Bypass LoginScript 4 RAS DialupClient 9x

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

When my Win9X clients login from home via RAS they execute the Domain Login Script (LS). I would to bypass when RAS connection is detected. I have found one way of doing this but cannot get it to work and I was hoping for you assistance. The LS should check a Registry entry on the Win9x client and if the entry is 1 then RAS client, if 0 then not RAS client.
***Copy this to a Batch file ***
:WIN9x
ECHO YOU ARE RUNNING WINDOWS 9x/ME

$IS_RAS=ReadValue("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\RemoteAccess","Remote Connection")
If $IS_RAS=01000000 goto YESRAS endif
Goto :END

:YESRAS
echo YesRas

:END
Echo END !

My Q... The ReadValue command does not read the registry and produce a result that I can use to test and move on down the LS.

Any Ideas would be appreciated.

9 replies

by rcc

I think there is an easier way of doing this. There is a Detect Slow Network connenction option in the POLICIES for win9x. This will prevent them from running the logon scripts...
Regards,
Radu

by cmeyer

Hi Radu,
I have checked every option in the Windows and command.adm files with Poledit...and found no option "Detect Slow Network" Thanks for responding.

If anyone has any other way of doing this via Login scripts. Please help.
Thanks

by rcc

Hi
My apologies, the entry is in the Default computer, at the networking. It is called network time-out or load balancing...I can't remember exactly, but I'll post the exact entry as soon as I get to my office (I'll post it as a comment). Since I've enabled this, none of my roaming users runns the logon script anymore.
Regards,
Radu

by tmaclennan

SMS 1.2 included a utility called CHECKRAS that determined the existence of a RAS connection. We use it this way in the login script:

if not exist c:\checkras.exe copy z:\checkras.exe c:c:\checkras
if errorlevel 1 goto skipsms

by cmeyer

Your Answer helped me find the solution.
This is how I did it.

:: Start of Batch file

@ECHO OFF

REM XXXXXXXXXXXXXXX

REM **** CHECK IF OS IS WINDOWS NT OR 9x

If "%OS%" == "Windows_NT" goto WINNT
goto Win9x

REM XXXXXXXXXXXXXXX

:WINNT
goto RASDETECT

:RASDETECT
If exist %windir%\slwnt32.exe goto NextNT
xcopy %logonserver%\netlogon\slwnt32.exe %windir%
goto NextNT

:NextNt
echo NextNT
%windir%\slwnt32.exe "\\Servername_IP\Netlogon 0 /v"
If errorlevel 1 goto NTRAS_SLOW

:NTRAS_Fast
echo NTRAS_FAST
REM add any commands here that you would like run.
goto ntend

:NTRAS_SLOW
echo NTRAS_SLOW
REM add any commands here that you would like run.
goto ntend

:NTEND
goto END

REM XXXXXXXXXXXXXXX

:WIN9X
echo win9x Detected
If exist C:\winme\slwnt32.exe goto Next9x
xcopy \\Servername_IP\netlogon\slwnt32.exe C:\winme

:Next9x
echo next9x
C:\winme\slwnt32.exe "\\Servername_IPNetlogon 0 /v"
If errorlevel 1 goto 9xRAS_SLOW

:9xRAS_Fast
echo 9xRAS_FAST
REM add any commands here that you would like run.
goto 9xend

:9xRAS_SLOW
echo 9xRAS_SLOW
REM add any commands here that you would like run. goto 9xend

:9XEND
goto END

REM XXXXXXXXXXXXXXX

:End
echo The End !

This discussion is closed to new replies.