Hi everyone! Been an abosolute age since i've posted anything on here. I see its still going strong as ever and also getting better.

Anyway i'm just after a bit of advice from some of you as you seem to be kinda like all rounders. Here goes.

We have several sites throughout the company and each site has a specific script that the users run. This is the logonscript that we run here at Stoke:

code:

@ECHO OFF
SET SERVER=STOKE
REM Verifying / Updating Script Software Installation, Please Wait...

IF "%OS%" == "Windows_NT" GOTO WinNT

%windir%\command\XCOPY %0\..\KIX\KIX32.EXE %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
%windir%\command\XCOPY %0\..\KIX\KX16.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
%windir%\command\XCOPY %0\..\KIX\KX32.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
%windir%\command\XCOPY %0\..\KIX\KX95.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
REM Loading Logon Script, Please Wait...
%windir%\system\kix32.exe \\%server%\sys\programs\logon\loginset.kix
CLS
GOTO End

:WinNT
XCOPY %0\..\KIX\KIX32.EXE %WINDIR%\SYSTEM32\ /D /H /I /R /V > NUL
XCOPY %0\..\NTUtils\igrant.exe %WINDIR%\SYSTEM32\ /D /H /I /R /V > NUL
XCOPY %0\..\NTUtils\rmtshare.exe %WINDIR%\SYSTEM32\ /D /H /I /R /V > NUL
REM Loading Logon Script, Please Wait...
%WINDIR%\SYSTEM32\KIX32.EXE \\%server%\sys\programs\logon\loginset.kix
CLS
GOTO end

:End
EXIT


This is the loginset.kix that is called from the above script.

; Kix32 script to do standard login tasks for Windows
CLS

code:

USE F: /DELETE
USE F: \\%SERVER%\SYS
USE P: /DELETE
USE P: \\%SERVER%\SYS
USE W: /DELETE
USE W: \\%SERVER%\SYS
USE X: /DELETE
USE X: "\\%CDLIBRARY%\CDLIBRARY"

IF INGROUP("None TCMS Users")
CALL "\\%SERVER%\SYS\PROGRAMS\LOGON\UPDATES.KIX"
ELSE
CALL "\\%SERVER%\SYS\PROGRAMS\LOGON\UPDATES.KIX"
CALL "\\%SERVER%\SYS\PROGRAMS\LOGON\DOWNWIN.KIX"
CALL "\\%SERVER%\SYS\PROGRAMS\LOGON\VECBUILDUPDT.KIX"
CALL "\\%SERVER%\SYS\PROGRAMS\LOGON\TCMSUPDT.KIX"
CALL "\\%SERVER%\SYS\PROGRAMS\LOGON\FIXINI.KIX"
ENDIF

IF @INWIN=2
SETTIME "\\%SERVER%"
SHELL "\\%SERVER%\SYS\PROGRAMS\LOGON\WINSET WIN95=1"
SHELL "\\%SERVER%\SYS\PROGRAMS\LOGON\WINSET SERVER=%SERVER%"
USE U: /DELETE
USE U: "\\%SERVER%\"+@USERID
SHELL "\\%SERVER%\SYS\PROGRAMS\LOGON\WINSET LOGNAME="+UCASE(@USERID)
SHELL "\\%SERVER%\SYS\PROGRAMS\LOGON\WINSET WPC=/@@U-"+UCASE(@USERID)
ELSE
SHELL "%COMSPEC% /E:1024 /C NET TIME \\%SERVER% /SET /Y > NUL"
$NAME = UCASE(@USERID)
SET "LOGNAME=$NAME"
$INT = "/@@U-"+UCASE(@USERID)
SET "WPC=$INT"
ENDIF


The one we use for say our Liverpool office would be identical except for the fact that the server variable would be set to the Liverpool server. Now this works fine for users that do not roam around different offices but the problem arises when we have a user that works from different offices. Say for example Jo Bloggs user is set up in Stoke he runs stokescr.bat which is fine when he is in Stoke as the scripts run at an adequate speed. But if he logs on in Liverpool he still runs the stoke script and connects to the stoke server and pulls any updates from there which can sometimes take ages. Has anybody got any ideas on a away around this? All I want the roaming users to be able to do is when they are in a remote office they just map the drives to their home server but when they are in their home office they run the updates.

I hope I have made some sense here and that you can be of some assistance. Any help or suggestions are welcome. I was thinking of using the slownet.exe command that comes with SMS but that just checks the speed of the logon server which is no help to me.

Thanks

Julian

[ 09 August 2001: Message edited by: Julian ]