Page 1 of 1 1
Topic Options
#5356 - 2000-11-27 10:02 PM Kix for Dialup users - Takes VERY long!
Anonymous
Unregistered


My company would like for us to speed up the process for dial up users logging into the network.

As it stands right now, when a laptop user logs in, it runs kix from the netlogon share. This is taking upwards of 3 minutes to run a script. What we would like to do, is identify RAS users using @RAS macro, then copy the Kix32 files to the laptop, and have it run the login script from the local executable, as opposed to copying it down from the netlogon share every time they connect.

What is the best way to do this?

Thanks in advance,

Judd

Top
#5357 - 2000-11-27 10:32 PM Re: Kix for Dialup users - Takes VERY long!
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
Why not speed up the local users also, this logon.bat wil speed up the local users in miliseconds and RAS users in minutes:

@Echo Off
IF "%OS%" == "Windows_NT" GOTO WinNT
XCOPY %0\..\KX*.DLL %WINDIR%\SYSTEM\ /D /I /R > NUL
:WinNT
XCOPY %0\..\KIX32.EXE %WINDIR%\SYSTEM\ /D /I /R > NUL
%WINDIR%\SYSTEM\KIX32.EXE %0\..\logon.KIX

-Erik

Top
#5358 - 2000-12-05 03:40 PM Re: Kix for Dialup users - Takes VERY long!
Anonymous
Unregistered


The @RAS macro, when it works, only identifies active session of the NT Remote Access Service. To easily identify remote users for all operating systems, you can do it by ip range.

Example, let's say your company has a range of IPs for lan users (10.0.0.1 - 10.0.0.200)
and remote users (10.0.0.201 - 10.0.0.254). You could identify them like this:
-----------------------------------------------------------------
;This section correctly breaks up and formats an IP address (bonus script)
$OCT1 = LTRIM(SUBSTR(@IPADDRESS0, 1, 3))
$OCT2 = LTRIM(SUBSTR(@IPADDRESS0, 5, 3))
$OCT3 = LTRIM(SUBSTR(@IPADDRESS0, 9, 3))
$OCT4 = LTRIM(SUBSTR(@IPADDRESS0, 13, 3))
$IP = "$OCT1.$OCT2.$OCT3.$OCT4"

$CTYPE = "LAN" ;CTYPE is the variable that indicates a LAN or RAS user
IF $OCT1="10" and $OCT2="0" and $OCT3="0"; Valid network user
IF $OCT4>"200" and $OCT4<"255"; ; Remote user detected
$CTYPE = "RAS"
ENDIF
ELSE ; Unauthorized network user
? "What are you doing here!"
$RCODE = LOGOFF(1) ; Logoff this spy!
ENDIF

? "$IP detected as $CTYPE user."
-------------------------------------------
Examples like this and many more are in my new scripting book called "Windows Admin Scripting." This book covers advanced WSH, KiXtart, Shell Scripting, AutoIt, ScriptIt, ADSI, WMI, logon scripting, and more. This book is really cool because it focuses on the topics and areas we deal with everyday. If you want to script it, its in here.

Here's the link: http://www.coriolis.com/store/product.asp?sku=1241 http://www.amazon.com/exec/obidos/ASIN/1576108813/

Top
#5359 - 2000-12-05 05:14 PM Re: Kix for Dialup users - Takes VERY long!
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Judd, the process that take the most time for your dialup users is the DL of the kix32.exe, dll's if win9x and finally the kix script it self. Read this thread here Will kixtart take much bandwidth accross WAN

Modifying your script so that it detects dialup users and runs accordingly is a very good idea too.

Bryce

Top
#5360 - 2000-12-05 06:42 PM Re: Kix for Dialup users - Takes VERY long!
Anonymous
Unregistered


If you want to do the check by IP address range method, it can be done in the batch file so no copying of Kix files is needed.

Works great even for VPN users which the @RAS method may not catch if the person is using DSL, cable modem or connecting from a remote office.

Only really good for searching for whole class C addresses though in it's current form. Could probably be modified to search for sections of a class if you wanted to.

- Login.bat --

code:
echo Checking for Dial-up connection.....
REM - Dial up range 1
route print | find "0.0.0.0" | find "AAA.BBB.CCC"
REM - AAA.BBB.CCC represents an IP address range to search for.
if errorlevel 1 goto next1
goto dupusr
:next1
REM - Dial up IP range 2
route print | find "0.0.0.0" | find "AAA.BBB.CCC"
if errorlevel 1 goto next2
goto dupusr
:next2
REM - VPN IP range
route print | find "0.0.0.0" | find "AAA.BBB.CCC"
if errorlevel 1 goto goclient
goto dupusr
REM - Dial up range not detected, LAN User.
REM - Start KixStart
Goto end
:dupusr
REM - Dial up user detected
REM - Don't start KixStart
:end

-- End Login.bat --

---------------------------------------------
I am now using this Login.bat which requires even remote computers to copy a very small 54k grep program. Should make adding custom IP ranges easier because of the more powerful grep utility.

--- Login.bat ---

code:
@echo off
xcopy /q /d /c %0\..\grep.exe %windir% > nul
echo Checking for Dial-up connection.....
route print | %windir%\grep -e "0.0.0.0" | %windir%\grep -c -e "AAA.BBB.CCC" -e "AAA.BBB.DDD" -e "AAA.BBB.EEE" > nul
if errorlevel 1 goto goclient

:dupusr
goto end

:goclient
xcopy /q /d /c %0\..\kix32.exe %windir% >nul
If "%os%"=="Windows_NT" goto NT
xcopy /q /d /c %0\..\kx32.dll %windir% >nul
xcopy /q /d /c %0\..\kx16.dll %windir% >nul
xcopy /q /d /c %0\..\kx95.dll %windir% >nul

:NT
%windir%\kix32.exe %0\..\login.kix
goto end

:end



--- Login.bat ---


Mark P.

[This message has been edited by mpearce (edited 05 December 2000).]

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 2107 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.055 seconds in which 0.028 seconds were spent on a total of 11 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org