I use the following batch files to install and update applications
on both Window Me clients and Windows XP clients
in windows 2000 server network environment.
My method is based on computer name of each clients
rather checking the version of the applications.
logon.batnet use I: \\server1\f1
net use J: \\server1\f2
net use F: \\server2
net time \\server1 /set /yes
if (%OS%) == (Windows_NT) goto XP
if exist F:\PROUP\SU.BAT start R:\PROUP\SU.BAT
goto end
:XP
if exist F:\PROUP\SU.BAT call R:\PROUP\SU.BAT
:end
exit
Click to view attachmentSU.BATset drive=R:
%drive%
cd %drive%\proup
if not exist c:\cname.bat start /wait ComputerName.vbs
call c:\cname.bat
set dir=SU1
if not exist %dir%\%cn% goto next1
if exist %dir%\%cn%.done goto next1
cd %dir%
for %%U in (*.bat) do call %%U
echo %cn% > %cn%.done
cd ..
:next1
set dir=SU2
if not exist %dir%\%cn% goto next2
if exist %dir%\%cn%.done goto next2
cd %dir%
for %%U in (*.bat) do call %%U
echo %cn% > %cn%.done
cd ..
:next2
:end
cls
@exit
Click to view attachmentComputerName.vbsSet objShell = Wscript.CreateObject("Wscript.Shell")
Set colSystemEnvVars = objShell.Environment("System")
Set colUserEnvVars = objShell.Environment("User")
Set objNetwork = Wscript.CreateObject("Wscript.Network")
UName = objNetwork.UserName
CName = objNetwork.ComputerName
Set WShell = CreateObject("WScript.Shell")
Call WShell.Run ("command /c echo set cn=" & cname & "> c:\cname.bat",,True)
WScript.DisconnectObject(WShell)
Wscript.Quit
UP.BATif (%OS%) == (Windows_NT) goto XP
:ME
if exist "C:\Program Files\7-Zip\Uninstall.exe" start /wait "C:\Program Files\7-Zip\Uninstall.exe" /S
ping locahost > NUL
goto end
:XP
if exist "%ProgramFiles%\7-Zip\Uninstall.exe" start /wait "aa" "%ProgramFiles%\7-Zip\Uninstall.exe" /S
ping locahost > NUL
:end
start /wait Seven-Zip\7z429.exe /S
regedit /s Seven-Zip\7-Zip.reg