Page 1 of 1 1
Topic Options
#75315 - 2003-06-08 07:40 AM Script execution time
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
Our users used to execute the login script from specific folder on the main domain when they login in. This login script executed through a bat file as follow:
%0\..\KIX32 %0\..\Login_Script.KIX

I have edited the bat file to copy the Kix32 and the script to the user workstation and execute the script from their as follow:
COPY %0\..\KIX32.EXE %WINDIR%\KIX32.EXE > NUL
COPY %0\..\ Login_Script.KIX %WINDIR%\ Login_Script.KIX > NUL
%WINDIR%\KIX32.exe %WINDIR%\ Login_Script.KIX

Will this speedup the script execution time?

Thank you.

Top
#75316 - 2003-06-08 08:58 AM Re: Script execution time
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Very little really. And it will copy every time via this batch file. You need a method to not copy every time they logon. Also you're looking for a support NIGHTMARE by copying the actual script to the local box. Very hard to impossible to keep updated.

Given the current speed of 4.21 I'd leave it all on the logon folder unless there are other issues I'm unaware of. (in my opinion).

Top
#75317 - 2003-06-08 01:13 PM Re: Script execution time
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I'd xcopy /d /v the kix32.exe to the client, but the script should remain on the server...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#75318 - 2003-06-08 05:37 PM Re: Script execution time
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
BTW,

You can check execution time with - DeltaTime()

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#75319 - 2003-06-08 07:13 PM Re: Script execution time
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
No you can't! It will not time how long it takes KiX to DL from netlogon. Once KiX is in memory the timing should be identical.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#75320 - 2003-06-08 08:10 PM Re: Script execution time
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Never mind.. I went back and re-read the main purpose of the script. The subject is worded 'Script execution time' where it needs to be 'How long to copy script files to the client?'.

Kent

[ 08. June 2003, 20:16: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#75321 - 2003-06-08 08:20 PM Re: Script execution time
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I should elaborate a bit...
If Wintendos are involved, then script timing can still be affected after KiX32.exe loads into memory. That is because Wintendo needs helper DLLs for certain conmmands, functions, and macros.

Having the binaries local on Wintendo improves the reliability and speed. Having local binaries on bandwidth challenged computers can make a difference as well. For well conected computers, I would just run KiX from netlogon.

[ 08. June 2003, 20:21: Message edited by: LLigetfa ]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#75322 - 2003-06-15 01:01 PM Re: Script execution time
attiahia Offline
Hey THIS is FUN

Registered: 2000-03-27
Posts: 268
Coping Kix32 and the login script every time was one of the batch concerns. (as Ntdoc mentioned)
I think the following modification in the batch will solve this problem.

IF Not Exist %WINDIR%\KIX32.EXE COPY %0\..\KIX32.EXE %WINDIR%\KIX32.EXE
IF Not Exist %WINDIR%\Login_Script.KIX COPY %0\..\ Login_Script.KIX %WINDIR%\ Login_Script.KIX
%WINDIR%\KIX32.exe %WINDIR%\Login_Script.KIX

Thank you.

Top
#75323 - 2003-06-15 01:57 PM Re: Script execution time
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You should review the two logon script batch file examples in the following thread: LOGON.BAT (the overkill version)

The second one only copies the files to the client when the files on the client either do not exist or the CRC32 check fails. You can also use "XCOPY /D" to update as necessary.

[ 15. June 2003, 13:58: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#75324 - 2003-06-15 04:34 PM Re: Script execution time
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If you copy the scripts to local and you test only for IF EXIST, then you risk losing control of the scripts. Anyone that does not like what your script does can modify it.

Either keep the scripts in NetLogon, or do a CRC check as Howard suggests.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#75325 - 2003-06-19 01:48 PM Re: Script execution time
Gaven Offline
Starting to like KiXtart
*

Registered: 2003-06-19
Posts: 103
Loc: Washinton DC, USA
I have a suggestion. Why don't you have the logon batch file copy kix32.exe to the %windir% if it doesn't exist, and run the Kix script from the netlogon folder. A small bit of code can then update the kix32.exe file as necessary. The benifit to this is based off the fact that the kix script is copied to memory on loading and the actual file is unused beyond that point. However it can be a burden on your server to be running the same kix32.exe file for dozens of workstations so running a local kix32.exe makes more sense and it ultimately minimizes bandwith use. The logon batch file should contain basic copy commands like:
If Not Exist %windir%\kix32.exe Copy %0\..\kix32.exe %windir%
start %windir%\kix32.exe %0\..\kixstart.kix

Then, to maintain the local kix32.exe file (and wkix32.exe as you'll see in the code), I have the following code run in the logon kix script:
; Define variables
$kixupdate = "%windir%\kixupd.bat" ; batch file to create to update KixStart executables

; Run this code at the begining of your logon script, all code before this will be run a SECOND time if kix32.exe gets updated
If Exist($kixupdate)
Del "$kixupdate"
goto "kixupddone"
EndIf

; Run this code at the end of the logon script
$fv1=GetFileVersion("%windir%\Kix32.exe","ProductVersion")
$fv2=GetFileVersion("%windir%\Wkix32.exe","ProductVersion")
$fv3=GetFileVersion("@LSERVER\NETLOGON\Kix32.exe","ProductVersion")
$fv4=GetFileVersion("@LSERVER\NETLOGON\Wkix32.exe","ProductVersion")
If $fv1<>$fv3 Or $fv2<>$fv4
$rc=Open(1,$kixupdate,5)
If $rc<>0
goto "kixupddone"
EndIf
$rc=WriteLine(1,"@@Echo Off"+@crlf+"ping 127.0.0.1 > nul"+@crlf+"Del %windir%\kix32.exe"+@crlf+"Del %windir%\wkix32.exe"+@crlf+"Copy @LSERVER\NETLOGON\kix32.exe %windir%"+@crlf+"Copy @LSERVER\NETLOGON\wkix32.exe %windir%"+@crlf+"start %windir%\wkix32.exe %windir%\kixstart.kix"+@crlf+"Exit")
$rc=Close(1)
Sleep 1
Run("$kixupdate")
Exit
EndIf
:kixupddone

Top
#75326 - 2003-06-19 02:31 PM Re: Script execution time
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the idea is ok.
but sorry, the loading of the batch file also does things.

don't think the bandwidth usage is as huge but the load time is slow.
and it will show the console window...
and...
_________________________
!

download KiXnet

Top
#75327 - 2003-06-20 04:40 AM Re: Script execution time
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
You can't copy to %WINDIR% if you do not have permission to do so, as is the case under Windows 2000/XP. See the referenced LOGON.BAT post for ways around this limitation.
_________________________
There are two types of vessels, submarines and targets.

Top
#75328 - 2003-06-20 11:47 AM Re: Script execution time
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
I CAN NOT warn you enough that you should NOT copy the script to the local systems.

Also, your batch file does not check if KIX32.EXE exists after the copy, if the copy fails so does your script.

Again, UNLESS you are on a VERY slow network, I HIGHLY RECOMMEND leaving everything on the NETLOGON share.

Much easier to control and manage from there. I used to use the local copy version of KiXtart, but then switched back to running from the NETLOGON and have never been happier.

Do some testing on your own with some of your clients manually and see if the time is really worth all the extra effort and management on your end trying to keep multiple systems up to date when run from the local boxes.

Top
#75329 - 2003-06-20 08:57 PM Re: Script execution time
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
This is my very small 'overkill version' of logon.bat

Always execute the KIX executeables from the client.

Needed KiX files are only copied if the are newer in the netlogon share.

This also handles the issues for %0\..\ on XP systems.
Instead of using %0\..\ on NT+ systems, this is used: %LogonServer%\NetLogon
This works on NT+ because the env. variable %LogonServer% is known to all af these OS's

code:
@Echo Off

Echo Network logon ...
Echo.

IF NOT EXIST C:\KiXdir\NUL MD C:\KiXdir

IF NOT %OS%.==. GoTo KixNT
XCopy %0\..\*Kix32.exe C:\KiXdir\*.* /D /R /Y >Nul
XCopy %0\..\KX*.dll C:\KiXdir\*.* /D /R /Y >Nul

C:\KiXdir\Kix32.exe %0\..\Logon\Logon.kix
Exit

:KixNT
Echo a | XCopy %LogonServer%\NetLogon\Kix32\*KiX32.exe C:\KiXdir\*.* /D /R >Nul
C:\KiXdir\Kix32.exe "%LogonServer%\NetLogon\Logon\Logon.kix"

I agree with NTDOC, don't copy the scripts to the client if you don't have a way of controlling the scriptversion other than xcopy /d

A totally different story:
I DO copy the script to the client, but the first called script, ie. logon.kix is NEVER copied to the client.
Logon.kix then checks the date/time of all other scripts called by logon.kix and copyes them to the client if the timestamp is different.

This would not speed up the logon time alone, because getting the timestamp of the files in the netlogon share would be about
the same time as executing the file from the netlogon share.

BUT:
I have a script that generates an ini-file with the timestamp for every file in the netlogon share, this file alone is checked for
time difference by logon.kix and if different it is copyed to the client. The rest of the file compare is then done on the client without
causing trafic on the net.

Sample of the ini-file
code:
[FileTime]
WinSet.exe=1995/08/24 10:50:00
NewPath.kix=2002/08/30 09:22:03
ProgInfo.kix=2002/04/01 17:53:24
PrtDef.ini=2003/06/10 15:10:09
UserMsg.kix=2002/06/26 19:20:06
UserPrf.kix=2002/11/10 19:20:23
W95PSet.kix=2002/07/23 13:39:18

The backside of this is that you have to execute the script that generates the ini-file each time you change anything in the
netlogon share.

The advantage is that you can use the same logonscript for all users, and don't bother if they are WAN or LAN users. AND You don't
have to create a userprofile to use at work and a differet userprofile to use at home if you have users connectet to the domain
from their home ws.

In a short time this won't matter to anyone (the ones that have converted to active directory and 2k+ on all clients [Wink] )

-Erik

Top
#75330 - 2003-06-20 11:16 PM Re: Script execution time
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Erik,

Your batch file has the same similar issue.
If for some reason the KIX32.EXE file is not copied to the client, you'll never process any logon script and you'll never know about it either. You make no check to verify the file is there before you try to call it.

Yes, I agree that we all can/do have our own methods of doing things. That is why I also mentioned actually doing some testing of the speed difference between the KiX files being on the NETLOGON and being locally. If you're testing only shows a mere second or so, why bother copying to the local system. Waste of time in my opinion ( My time [Eek!] )

Top
Page 1 of 1 1


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

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.045 seconds in which 0.015 seconds were spent on a total of 12 queries. Zlib compression enabled.

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