@echo off
echo Starting Windows patch.
echo. | date
echo. | time
echo Starting Windows patch. >c3patch.log
echo. | date >>c3patch.log
echo. | time >>c3patch.log

:ckdw3l

if ".%3"=="./l" goto psin3l
if ".%3"=="./L" goto psin3l
goto dskw3l
:psin3l

if exist %1\disk3l.mid goto dskw3l
echo.
echo Please insert disk #3 into %1
echo Please insert disk #3 into %1 >>c3patch.log
echo.
pause
goto ckdw3l

:dskw3l

if ".%3"=="./l" goto pscp3l02
if ".%3"=="./L" goto pscp3l02
goto okw3l03
:pscp3l02

echo.
echo Copying/patching Windows file #1 of 1 from disk #3
echo. >>c3patch.log
echo Copying/patching Windows file #1 of 1 from disk #3 >>c3patch.log
copy %1\c2_c3_lw.rtp .

echo.
echo Patching the Windows Locked AutoCAD executable.
echo This will take a while...
echo. >>c3patch.log
echo Patching the Windows Locked AutoCAD executable. >>c3patch.log
echo This will take a while... >>c3patch.log
echo.
echo .\patch . c2_c3_lw.rtp >>c3patch.log
.\patch . c2_c3_lw.rtp >>c3patch.log
if errorlevel 1 goto now3l01
echo.
echo Windows Locked AutoCAD executable successfully patched.
echo Windows Locked AutoCAD executable successfully patched. >>c3patch.log
echo.
rem pause
goto okw3l02

:now3l01

echo.
echo Patch of Windows Locked AutoCAD executable failed!
echo Patch of Windows Locked AutoCAD executable failed! >>c3patch.log
goto patchdie

:okw3l02
del c2_c3_lw.rtp
:okw3l03

:ckdw3u

if ".%3"=="./u" goto psin3u
if ".%3"=="./U" goto psin3u
goto dskw3u
:psin3u

if exist %1\disk3u.mid goto dskw3u
echo.
echo Please insert disk #3 into %1
echo Please insert disk #3 into %1 >>c3patch.log
echo.
pause
goto ckdw3u

:dskw3u

if ".%3"=="./u" goto pscp3u02
if ".%3"=="./U" goto pscp3u02
goto okw3u03
:pscp3u02

echo.
echo Copying/patching Windows file #1 of 1 from disk #3
echo. >>c3patch.log
echo Copying/patching Windows file #1 of 1 from disk #3 >>c3patch.log
copy %1\c2_c3_uw.rtp .

echo.
echo Patching the Windows Unlocked AutoCAD executable.
echo This will take a while...
echo. >>c3patch.log
echo Patching the Windows Unlocked AutoCAD executable. >>c3patch.log
echo This will take a while... >>c3patch.log
echo.
echo .\patch . c2_c3_uw.rtp >>c3patch.log
.\patch . c2_c3_uw.rtp >>c3patch.log
if errorlevel 1 goto now3u01
echo.
echo Windows Unlocked AutoCAD executable successfully patched.
echo Windows Unlocked AutoCAD executable successfully patched. >>c3patch.log
echo.
rem pause
goto okw3u02

:now3u01

echo.
echo Patch of Windows Unlocked AutoCAD executable failed!
echo Patch of Windows Unlocked AutoCAD executable failed! >>c3patch.log
goto patchdie

:okw3u02
del c2_c3_uw.rtp
:okw3u03

:ckdw1

if exist %1\disk1.mid goto dskw1
echo.
echo Please insert disk #1 into %1
echo Please insert disk #1 into %1 >>c3patch.log
echo.
pause
goto ckdw1

:dskw1

echo.
echo Copying/patching Windows file #1 of 3 from disk #1
echo. >>c3patch.log
echo Copying/patching Windows file #1 of 3 from disk #1 >>c3patch.log
copy %1\2_3_acis.rtp .

echo.
echo Patching the Windows ACIS Library.
echo. >>c3patch.log
echo Patching the Windows ACIS Library. >>c3patch.log
echo.
echo .\patch . 2_3_acis.rtp >>c3patch.log
.\patch . 2_3_acis.rtp >>c3patch.log
if errorlevel 1 goto now101
echo.
echo Windows ACIS Library successfully patched.
echo Windows ACIS Library successfully patched. >>c3patch.log
echo.
rem pause
goto okw102

:now101

echo.
echo Patch of Windows ACIS Library failed!
echo Patch of Windows ACIS Library failed! >>c3patch.log
echo.
echo Press CTRL-C to exit now  --OR--
pause

:okw102
del 2_3_acis.rtp
:okw103

echo.
echo Copying/patching Windows file #2 of 3 from disk #1
echo. >>c3patch.log
echo Copying/patching Windows file #2 of 3 from disk #1 >>c3patch.log
copy %1\2_3_seuw.rtp .

echo.
echo Patching the Windows Localized files.
echo. >>c3patch.log
echo Patching the Windows Localized files. >>c3patch.log
echo.
echo .\patch . 2_3_seuw.rtp >>c3patch.log
.\patch . 2_3_seuw.rtp >>c3patch.log
if errorlevel 1 goto now111
echo.
echo Windows Localized files successfully patched.
echo Windows Localized files successfully patched. >>c3patch.log
echo.
rem pause
goto okw112

:now111

echo.
echo Patch of Windows Localized files failed!
echo Patch of Windows Localized files failed! >>c3patch.log
echo.
echo Press CTRL-C to exit now  --OR--
pause

:okw112
del 2_3_seuw.rtp
:okw113

echo.
echo Copying/patching Windows file #3 of 3 from disk #1
echo. >>c3patch.log
echo Copying/patching Windows file #3 of 3 from disk #1 >>c3patch.log
copy %1\2_3_sguw.rtp .

echo.
echo Patching the Windows Globalized files.
echo. >>c3patch.log
echo Patching the Windows Globalized files. >>c3patch.log
echo.
echo .\patch . 2_3_sguw.rtp >>c3patch.log
.\patch . 2_3_sguw.rtp >>c3patch.log
if errorlevel 1 goto now121
echo.
echo Windows Globalized files successfully patched.
echo Windows Globalized files successfully patched. >>c3patch.log
echo.
rem pause
goto okw122

:now121

echo.
echo Patch of Windows Globalized files failed!
echo Patch of Windows Globalized files failed! >>c3patch.log
echo.
echo Press CTRL-C to exit now  --OR--
pause

:okw122
del 2_3_sguw.rtp
:okw123
   
if exist %2\c3patch.log copy %2\c3patch.log %2\c3patch.dos
echo Starting Common patch. >%2\c3patch.log
echo. | date >>%2\c3patch.log
echo. | time >>%2\c3patch.log
if not exist %2\c3patch.dos goto docom
echo Common files already updated by earlier DOS update. >>%2\c3patch.log
goto cdfrmcom
:docom

echo.
echo Copying/patching Common file #1 of 2 from disk #1
echo. >>%2\c3patch.log
echo Copying/patching Common file #1 of 2 from disk #1 >>%2\c3patch.log
copy %1\2_3_seuc.rtp .

echo.
echo Patching the Common AutoLISP files.
echo. >>%2\c3patch.log
echo Patching the Common AutoLISP files. >>%2\c3patch.log
echo.
echo .\patch %2 2_3_seuc.rtp >>%2\c3patch.log
.\patch %2 2_3_seuc.rtp >>%2\c3patch.log
if errorlevel 1 goto noc101
echo.
echo Common AutoLISP files successfully patched.
echo Common AutoLISP files successfully patched. >>%2\c3patch.log
echo.
rem pause
goto okc102

:noc101

echo.
echo Patch of Common AutoLISP files failed!
echo Patch of Common AutoLISP files failed! >>%2\c3patch.log
echo.
echo Press CTRL-C to exit now  --OR--
pause

:okc102
del 2_3_seuc.rtp
:okc103

echo.
echo Copying/patching Common file #2 of 2 from disk #1
echo. >>%2\c3patch.log
echo Copying/patching Common file #2 of 2 from disk #1 >>%2\c3patch.log
copy %1\2_3_sguc.rtp .

echo.
echo Patching the Common Support files.
echo. >>%2\c3patch.log
echo Patching the Common Support files. >>%2\c3patch.log
echo.
echo .\patch %2 2_3_sguc.rtp >>%2\c3patch.log
.\patch %2 2_3_sguc.rtp >>%2\c3patch.log
if errorlevel 1 goto noc111
echo.
echo Common Support files successfully patched.
echo Common Support files successfully patched. >>%2\c3patch.log
echo.
rem pause
goto okc112

:noc111

echo.
echo Patch of Common Support files failed!
echo Patch of Common Support files failed! >>%2\c3patch.log
echo.
echo Press CTRL-C to exit now  --OR--
pause

:okc112
del 2_3_sguc.rtp
:okc113

:cdfrmcom

:ckdwWHIP

if exist %1\WHIP.mid goto dskwWHIP
echo.
echo Please insert the WHIP disk into %1
echo Please insert the WHIP disk into %1 >>c3patch.log
echo.
pause
goto ckdwWHIP

:dskwWHIP

echo.
echo Copying Windows file #1 of 2 from the WHIP disk
echo. >>c3patch.log
echo Copying Windows file #1 of 2 from the WHIP disk >>c3patch.log
copy %1\dsacaddl.dll .

echo.
echo Copying Windows file #2 of 2 from the WHIP disk
echo. >>c3patch.log
echo Copying Windows file #2 of 2 from the WHIP disk >>c3patch.log
copy %1\dsacaddl.hlp .

echo.
echo Patch Windows ASE files?
echo Press CTRL-C to exit now  --OR--
pause

:ckdw4

if exist %1\disk4.mid goto dskw4
echo.
echo Please insert disk #4 into %1
echo Please insert disk #4 into %1 >>c3patch.log
echo.
pause
goto ckdw4

:dskw4

echo.
echo Copying/patching Windows file #2 of 2 from disk #4
echo. >>c3patch.log
echo Copying/patching Windows file #2 of 2 from disk #4 >>c3patch.log
copy %1\2_3_asew.rtp .

echo.
echo Patching the Windows ASE files.
echo This will take a while...
echo. >>c3patch.log
echo Patching the Windows ASE files. >>c3patch.log
echo This will take a while... >>c3patch.log
echo.
echo .\patch . 2_3_asew.rtp >>c3patch.log
.\patch . 2_3_asew.rtp >>c3patch.log
if errorlevel 1 goto now411
echo.
echo Windows ASE files successfully patched.
echo Windows ASE files successfully patched. >>c3patch.log
echo.
rem pause
goto okw412

:now411

echo.
echo Patch of Windows ASE files failed!
echo Patch of Windows ASE files failed! >>c3patch.log
echo.
echo Press CTRL-C to exit now  --OR--
pause

:okw412
del 2_3_asew.rtp
:okw413

:patchdie
del patch.exe
