Hi all,

I've made a batch-file that will check and update any files that are of importance to the logon-sequence (I think...)

I haven't tested it thouroughly so please, please, please test it before you implement it.

this is the batch file:

code:

@Echo off
REM *** update95.bat ***

set SYSDIR=%windir%\system

REM *** Kixfiles needed for Win9x ***

fc /l %0\..\Kix\Kix32.exe %sysdir%\Kix32.exe | find "geen verschillen" > nul
if errorlevel 1 copy %0\..\Kix\Kix32.exe %sysdir%\Kix32.exe > nul

fc /l %0\..\Kix\Kix16.dll %sysdir%\Kix16.dll | find "geen verschillen" > nul
if errorlevel 1 copy %0\..\Kix\Kix16.dll %sysdir%\Kix16.dll > nul

fc /l %0\..\Kix\Kix32.dll %sysdir%\Kix32.dll | find "geen verschillen" > nul
if errorlevel 1 copy %0\..\Kix\Kix32.dll %sysdir%\Kix32.dll > nul

fc /l %0..\Kix\Kix95.dll %sysdir%\Kix95.dll | find "geen verschillen" > nul
if errorlevel 1 copy %0\..\Kix\Kix95.dll %sysdir%\Kix95.dll > nul

REM *** Exotic Win9x files ***

set CHGDLL=
if exist %windir%\wininit.ini set CHGDLL=YES

fc /l %0\..\Win9x\Msvcrt.dll %sysdir%\Msvcrt.dll | find "geen verschillen" > nul
if errorlevel 0 goto netapi
if .%CHGDLL%.==.. ECHO [Rename] > %windir\wininit.ini
copy %0\..\Win9x\Msvcrt.dll %sysdir%\Msvcrt.new > nul
ECHO %sysdir%\Msvcrt.dll %sysdir%\Msvcrt.new >> %windir%\wininit.ini
set CHGDLL=YES

:netapi
fc /l %0\..\Win9x\netapi.dll %sysdir%\netapi.dll | find "geen verschillen" > nul
if errorlevel 0 goto netapi32
if .%CHGDLL%.==.. ECHO [Rename] > %windir\wininit.ini
copy Win9x\Netapi.dll > %sysdir%\Netapi.new > nul
ECHO %sysdir%\Netapi.dll %sysdir%\Netapi.new >> %windir%\wininit.ini
set CHGDLL=YES

:netapi32
fc /l %0\..\Win9x\netapi32.dll %sysdir%\netapi32.dll | find "geen verschillen" > nul
if errorlevel 0 goto msnet32
if .%CHGDLL%.==.. ECHO [Rename] > %windir\wininit.ini
copy %0\..\Win9x\Netapi32.dll > %sysdir%\Netapi32.new > nul
ECHO %sysdir%\Netapi32.dll %sysdir%\Netapi32.new >> %windir%\wininit.ini
set CHGDLL=YES

:msnet32
fc /l %0\..\Win9x\msnet32.dll %sysdir%\msnet32.dll | find "geen verschillen" > nul
if errorlevel 0 goto done
if .%CHGDLL%.==.. ECHO [Rename] > %windir\wininit.ini
copy %0\..\Win9x\msnet32.dll > %sysdir%\msnet32.new > nul
ECHO %sysdir%\msnet32.dll %sysdir%\msnet32.new >> %windir%\wininit.ini
set CHGDLL=YES

REM *** Done ***
:done
if .%CHGDLL%.==.. goto end

cls
ECHO Changes have been made to your configuration.
ECHO.
ECHO You should reboot your system to ensure a proper working
ECHO of the operating system.
ECHO.
pause

:end


As you can see it uses the wininit.ini to replace some files (that are in use during the logon-procedure)

All files are placed in the WINDOWS\SYSTEM directory so your logon-batch file should look like this:

code:

call "update95.bat"
%windir%\system\kix32.exe %0\..\logon.kix

or something similar

It also uses the find command. You have to adapt it to your own language. the phrase 'Geen verschillen' is dutch for 'no differences' but i'm not really sure what the exact result is in your language so you have to test fc and look at the result between to files (that are the same).

You will have to have two subdirs in the netlogon share. One named Kix and have the following files in it:

kix32.exe
kix16.dll
kix32.dll
kix95.dll

the other subdir has to be called win9x and should contain the files:

msvcrt.dll
netapi.dll
netapi32.dll
msnet32.dll


As I've said before, please test it, and if you have any suggestions I'm always very interested.

I'm still working on the WNT4.0 part of this batch so there will be another subdir called WinNT, wich will contain the specific winnt files.

------------------
Greetz,

Roger the Young
------------------------
The code is out there...
------------------------

[This message has been edited by DrillSergeant (edited 11 February 2001).]

[This message has been edited by DrillSergeant (edited 11 February 2001).]

_________________________
The Code is out there