#5001 - 2000-11-10 01:29 PM
@KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
I would like to use the "KIX" macro to find out if KiXtart needs to be updated. I can use it in my script to check the local version of KIX but how do I compare this with the version on the server? I think this is a simple question for you wizzards? Greetings, eddy------------------ Eastborn Slaapsytemen BV Eddy Croezen
|
|
Top
|
|
|
|
#5003 - 2000-11-10 04:19 PM
Re: @KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
Yoh Jochen, Almost got it. Now using ;$temp0= GetFileVersion( "%0\..\kix32.exe", "ProductVersion") $result= substr($temp0, 1, 1) + "." + substr($temp0, 4 ,2) If $result <> @KIX ?"update" else ?"not update" endif Still a little problem; It doesn't reads the fileversion on the server. So if you can kix me in the right direction once again? Thanks alot! eddy ------------------ Eastborn Slaapsytemen BV Eddy Croezen
|
|
Top
|
|
|
|
#5005 - 2000-11-10 04:46 PM
Re: @KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
Alrightie, but it doesn't retrieve information from the server.$2=getfiletime("%0\..\kix32.exe") $2 is empty ???? So with both options it seems to be the same problem. ------------------ Eastborn Slaapsytemen BV Eddy Croezen
|
|
Top
|
|
|
|
#5007 - 2000-11-10 05:15 PM
Re: @KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
Yes the kix32.exe is in my logondirectory (something like system\repl\import)$2=getfiletime("%0\..\kix32.exe") @KIX return the version of the local kix32.exe ------------------ Eastborn Slaapsytemen BV Eddy Croezen
|
|
Top
|
|
|
|
#5010 - 2000-11-11 09:36 AM
Re: @KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
Jochen,Locally in my windows directory i have kix version 3.62 On the server in the netlogon directory is version 3.63 getfiletime("c:\windows\kix32.exe") returns " 1999/11/24 16:50:01 " getfiletime("%0\..\kix32.exe") returns "" @KIX returns "3.62" So the problem is checking the version on the server. ------------------ Eastborn Slaapsytemen BV Eddy Croezen [This message has been edited by croezen (edited 11 November 2000).]
|
|
Top
|
|
|
|
#5011 - 2000-11-11 02:58 PM
Re: @KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
Use of the syntax %0\..\ is discussed in Knowledge Base article Q121387 and when ik read this it explains its use in batchfiles (logon.bat), but ; Does this work in kix files as well ?------------------ Eastborn Slaapsytemen BV Eddy Croezen
|
|
Top
|
|
|
|
#5012 - 2000-11-12 01:35 PM
Re: @KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
Hi All,My Trick to do the job: ( It's not really checkin' the version, but just checkin' a key created by the script itself). code:
$KiXversion = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\SysBeh","KiXversion") IF $KiXversion <> "3,63,0,0" IF EXIST ($WINDIR + "\BACKUP\Lmscript.exe_old") <> 1 COPY $WINDIR + "\SYSTEM\LMSCRIPT.EXE" $WINDIR + "\BACKUP\Lmscript.exe_old" ENDIF COPY @LDRIVE + "Kix32.exe" $WINDIR + "\SYSTEM\Lmscript.exe" COPY @LDRIVE + "Kx16.dll" $WINDIR + "\SYSTEM\Kx16.dll" COPY @LDRIVE + "Kx32.dll" $WINDIR + "\SYSTEM\Kx32.dll" COPY @LDRIVE + "Kx95.dll" $WINDIR + "\SYSTEM\Kx95.dll" WRITEVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\SysBeh","KiXversion","3,63,0,0","REG_SZ") ENDIF
Of course the READ- and WRITEVALUE need to be modified every time you update KiX. Cya, Wam. [This message has been edited by Wam (edited 12 November 2000).] [This message has been edited by Wam (edited 13 November 2000).]
|
|
Top
|
|
|
|
#5013 - 2000-11-13 02:32 PM
Re: @KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
How about; :updatekix $updatekix= CompareFileTimes( %WINDIR%\kix32.exe, @LDRIVE\kix32.exe) if $updatekix = -3 or $updatekix = -2 messagebox("Error @Error","",64) endif if $updatekix = -1 messagebox("Local Kix version needs updating","",64) COPY "@LDRIVE\Kix32.exe" "%WINDIR%\kix32.exe" if @Error <> 0 messagebox("Error @Error","",64) sleep 15 endif COPY "@LDRIVE\kx16.dll" "%WINDIR%\kx16.dll" COPY "@LDRIVE\kx32.dll" "%WINDIR%\kx32.dll" COPY "@LDRIVE\kx95.dll" "%WINDIR%\kx95.dll" endif if $updatekix = 0 messagebox("Kix version is OK","",64) endif if $updatekix = 1 messagebox("Kix version is newer then Serverversion!!!!","",64) if @FULLNAME = "Eddy Croezen" messagebox("Serverversion of Kix is beeing updated","",64) else messagebox("What the xxx are you doing with this new kix version","",64) endif endif return
The problem with this solution is that I get an error 32!! Because Kix32.exe is in use ?
------------------ Eastborn Slaapsytemen BV * Eddy Croezen
|
|
Top
|
|
|
|
#5014 - 2000-11-13 03:36 PM
Re: @KIX on server and on client ?
|
Bryce
KiX Supporter
   
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
If all you are wanting to do is make sure that the current version of kix is installed on the local client.....you might want to do this from the same batch file that launches your logon script and use the xcopy command.code:
@Echo OffCLS ECHO Verifying / Updating Script Software Installation, Please Wait... IF "%OS%" == "Windows_NT" GOTO WinNT %windir%\command\XCOPY %0\..\KIX32.EXE %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL %windir%\command\XCOPY %0\..\KX16.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL %windir%\command\XCOPY %0\..\KX32.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL %windir%\command\XCOPY %0\..\KX95.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL ECHO Loading Logon Script, Please Wait... %windir%\system\kix32.exe %0\..\logon.kix GOTO End :WinNT XCOPY %0\..\KIX32.EXE %WINDIR%\SYSTEM32\ /D /H /I /R /V > NUL ECHO Loading Logon Script, Please Wait... %WINDIR%\SYSTEM32\KIX32.EXE %0\..\logon.KIX GOTO end :End
Bryce
|
|
Top
|
|
|
|
#5015 - 2000-11-14 09:45 AM
Re: @KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
Thanks a lot Bryce, that seems to be te best solution!
------------------ Eastborn Slaapsytemen BV * Eddy Croezen
|
|
Top
|
|
|
|
#5016 - 2000-11-26 09:54 PM
Re: @KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
Bryce,That last batch file you show works great! I was wondering if there is a way to do an "IF" statement in the BATCH file to determine if the files already exist so you could bypass the copying of the files. I don’t really want to copy them unless they aren’t there for some reason. Or maybe a way to check the version and copy them if the version on the workstation is older than what is on the server (from within the BATCH file)? Of course you guys have been discussing this above. But that is from within a kix file. I would like to do it from the batch file so that it would be updated before it runs the kix logon script. Thanks, Pete
[This message has been edited by PCC (edited 26 November 2000).]
|
|
Top
|
|
|
|
#5018 - 2000-11-28 04:29 PM
Re: @KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
That's what I thought...but it doesn't seem to be working that way. It copies the files every time the batch file is run.Any ideas why it would be doing this? Thanks, Pete
|
|
Top
|
|
|
|
#5020 - 2000-11-28 07:02 PM
Re: @KIX on server and on client ?
|
Anonymous
Anonymous
Unregistered
|
It appears that it is only doing this on my Win9x clients. But here is the printout.Copies files and directory trees. XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U] [/K] [/N] [/Z] source Specifies the file(s) to copy. destination Specifies the location and/or name of new files. /A Copies files with the archive attribute set, doesn't change the attribute. /M Copies files with the archive attribute set, turns off the archive attribute. /D:m-d-y Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time. /P Prompts you before creating each destination file. /S Copies directories and subdirectories except empty ones. /E Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T. /V Verifies each new file. /W Prompts you to press a key before copying. /C Continues copying even if errors occur. /I If destination does not exist and copying more than one file, assumes that destination must be a directory. /Q Does not display file names while copying. /F Displays full source and destination file names while copying. /L Displays files that would be copied. /H Copies hidden and system files also. /R Overwrites read-only files. /T Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories. /U Copies only files that already exist in destination. /K Copies attributes. Normal Xcopy will reset read-only attributes. /N Copies using the generated short names. /Z Copies networked files in restartable mode. Thanks, Pete
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1110 anonymous users online.
|
|
|