General discussion

Locked

Bypass LoginScript 4 RAS DialupClient 9x

By cmeyer ·
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.

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Bypass LoginScript 4 RAS DialupClient 9x

by RCC In reply to Bypass LoginScript 4 RAS ...

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

Collapse -

Bypass LoginScript 4 RAS DialupClient 9x

by cmeyer In reply to Bypass LoginScript 4 RAS ...

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

Collapse -

Bypass LoginScript 4 RAS DialupClient 9x

by RCC In reply to Bypass LoginScript 4 RAS ...

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

Collapse -

Bypass LoginScript 4 RAS DialupClient 9x

by cmeyer In reply to Bypass LoginScript 4 RAS ...
Collapse -

Bypass LoginScript 4 RAS DialupClient 9x

by tmaclennan In reply to Bypass LoginScript 4 RAS ...

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

Collapse -

Bypass LoginScript 4 RAS DialupClient 9x

by cmeyer In reply to Bypass LoginScript 4 RAS ...

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 !

Collapse -

Bypass LoginScript 4 RAS DialupClient 9x

by jbaumann In reply to Bypass LoginScript 4 RAS ...

I believe the compare should be...

If $IS_RAS = "01000000" goto YESRAS endif

Collapse -

Bypass LoginScript 4 RAS DialupClient 9x

by cmeyer In reply to Bypass LoginScript 4 RAS ...
Collapse -

Bypass LoginScript 4 RAS DialupClient 9x

by cmeyer In reply to Bypass LoginScript 4 RAS ...

This question was closed by the author

Back to Windows Forum
9 total posts (Page 1 of 1)  

Related Discussions

Related Forums