Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.naic.edu/~phil/hardware/vertex/sharemegsvertex/lcu/pcr/lan/QINSTALL/QUICKNW1.SCR
Дата изменения: Wed Feb 16 18:00:02 1994
Дата индексирования: Thu Jan 15 15:06:39 2009
Кодировка:
:* %VER3C5X9 quicknw1.scr v1.0f

goto @arg4@

:* ***************************************************************************
:* type the file to the screen and the log file
:type
moveto start
:logTypeLoop
set line @currentLine@
delete
if error logtypeDone
write echo c:\quickins.log "@line@\n"
goto logTypeLoop
:logTypeDone
abort 0

:* ***************************************************************************
:* Check that we have a single adapter
:adapter
moveto start
find "-----------------"
moveto next
if match "^[ ]*[0-9]+[ ]+" haveone
:* no adapters
abort 199
:haveone
moveto next
find "^[ ]*[0-9]+[ ]+"
if error onlyone
:* more than one adapter is not supported
abort 200
:onlyone
if match " ISA" doconfig
abort 198
:doconfig
abort 0

:* ***************************************************************************
:* edit the CONFIG.SYS file
:config
set changes no

:* make sure we have a minimum number of BUFFERS
set want 20
set found no
moveto start
:loopBuffers
find "buffers *= *{[0-9]+}"
if error endBuffers
set value @1@
if match "^ *rem" nextBuffers
set found yes
if not equal "@compare value want@" less nextBuffers
set changes yes
insert "rem @currentLine@"
change "buffers *= *[0-9]+" "buffers=@want@"
:nextBuffers
moveto next
goto loopBuffers
:endBuffers
if equal @found@ yes haveBuffers
moveto end
set changes yes
insert "buffers=@want@"
:haveBuffers

:* make sure we have a LASTDRIVE less than Z and create a batch file to
:* set a variable so the calling script will know what the letter after
:* LASTDRIVE is.
set found no
moveto start
:loopLastDrive
find "lastdrive *= *{[a-z]}"
if error endLastDrive
set value @1@
if match "^ *rem" nextLastDrive
set lastdriv @value@
set found yes
if not equal @lastdriv@ z nextLastDrive
set changes yes
replace "LASTDRIVE=E"
set lastdriv e
write c:\quicknw.3cm\lastdriv.txt "\n"
write c:\quicknw.3cm\lastdriv.txt "The LASTDRIVE statement in your CONFIG.SYS file was set to Z. This is\n"
write c:\quicknw.3cm\lastdriv.txt "not compatible with Netware. We have changed the value to E so Netware\n"
write c:\quicknw.3cm\lastdriv.txt "will use F as the first network drive. If this is a problem, please update\n"
write c:\quicknw.3cm\lastdriv.txt "the value in CONFIG.SYS and change the drive Netware uses for the LOGIN\n"
write c:\quicknw.3cm\lastdriv.txt "command in the AUTOEXEC.BAT file. You MUST reboot your computer for this\n"
write c:\quicknw.3cm\lastdriv.txt "change to take effect.\n"
:nextLastDrive
moveto next
goto loopLastDrive
:endLastDrive
if equal @found@ yes haveLastDrive
moveto end
set changes yes
insert "lastdrive=e"
set lastdriv e
:haveLastDrive
set string abcdefghijklmnopqrstuvwxyz
:scanLastDrive
set letter "@left string 1@"
set string "@middle string 1 26@"
if not equal @letter@ @lastdriv@ scanLastDrive
write lastdrv.dat "@left string 1@\n"
if equal @changes@ no abortConfig
exit
:abortConfig
abort 0

:* ***************************************************************************
:* edit the AUTOEXEC.BAT file. produce a batch file that lets the calling
:* script know where the Netware files should be put.
:autoexec
set changes no
set addedLogin no
set lastDrive @arg5@

moveto start
:loopsnet
find "{([a-z]:)?\\?([a-z0-9_.]+\\)*}startnet(\.bat)?"
if error endsnet
set targetsnet @1@
if match "^rem" nextsnet
if match "^if not exist" nextsnet
goto VLMabort
:nextsnet
moveto next
goto loopsnet
:VLMabort
abort 197
:endsnet

moveto start
:loopipx
find "{([a-z]:)?\\?([a-z0-9_.]+\\)*}ipx(\.(com|exe))?"
if error endipx
set targetipx @1@
if match "^rem" nextipx
if match "^if not exist" nextipx
if match "ipxodi" nextipx
goto tagipx
:nextipx
moveto next
goto loopipx
:tagipx
replace "rem @targetipx@ipx"
insert "rem We have upgraded your IPX installation to ODI."
:loopipxn
find "{([a-z]:)?\\?([a-z0-9_.]+\\)*}netx(\.(com|exe))?"
if error endipxn
set targetipxn @1@
if match "^rem" nextipxn
if match "^if not exist" nextipxn
goto tagipxn
:nextipxn
moveto next
goto loopipxn
:tagipxn
replace "rem @targetipxn@netx"
:loopLogn
find "{([a-z]:)?\\?([a-z0-9_.]+\\)*}login"
if error endLogn
set targlogn @1@
if not match "^rem" tagLogn
moveto next
goto loopLogn
:tagLogn
replace "rem @targlogn@login"
:endLogn
:endipxn
:endipx


moveto start
:loopLsl
find "{([a-z]:)?\\?([a-z0-9_.]+\\)*}lsl(\.com)?"
if error endLsl
set targLsl @1@
if match "^rem" nextLsl
if match "^if not exist" nextLsl
goto tagLsl
:nextLsl
moveto next
goto loopLsl
:tagLsl
tag lsl
set targetlsl @targlsl@
:endLsl

moveto start
:loopDriver
find "{([a-z]:)?\\?([a-z0-9_.]+\\)*}3c5x9(\.com)?"
if error endDriver
set targDriver @1@
if match "^rem" nextDriver
if match "^if not exist" nextDriver
goto tagDriver
:nextDriver
moveto next
goto loopDriver
:tagDriver
tag Driver
set targetdriver @targdriver@
:endDriver

moveto start
:loopIpxodi
find "{([a-z]:)?\\?([a-z0-9_.]+\\)*}ipxodi(\.com)?"
if error endIpxodi
set targIpxodi @1@
if match "^rem" nextIpxodi
if match "^if not exist" nextIpxodi
goto tagIpxodi
:nextIpxodi
moveto next
goto loopIpxodi
:tagIpxodi
tag ipxodi
set targetipxodi @targipxodi@
:endIpxodi

moveto start
:loopNetx
find "{([a-z]:)?\\?([a-z0-9_.]+\\)*}netx(\.(com|exe))?"
if error endNetx
set targNetx @1@
if match "^rem" nextNetx
if match "^if not exist" nextNetx
goto tagNetx
:nextNetx
moveto next
goto loopNetx
:tagNetx
tag Netx
set targetnetx @targnetx@
:endNetx

moveto start
:loopLogin
find "{([a-z]:)?\\?([a-z0-9_.]+\\)*}login"
if error endLogin
if not match "^rem" tagLogin
moveto next
goto loopLogin
:tagLogin
tag Login
:endLogin

if not equal @targetLsl@ "" notBlank
set targetLsl "c:\"
:notBlank
if not equal @targetDriver@ "" notBlank
set targetDriver @targetLsl@
:notBlank
if not equal @targetIpxodi@ "" notBlank
set targetIpxodi @targetLsl@
:notBlank
if not equal @targetNetx@ "" notBlank
set targetNetx @targetLsl@
:notBlank

if not equal @targetLsl@ @targetDriver@ targetsBad
if not equal @targetLsl@ @targetIpxodi@ targetsBad
if not equal @targetLsl@ @targetNetx@ targetsBad
goto targetsGood
:targetsBad
abort 200
:targetsGood
set target @targetLsl@
if equal "@middle target 1 1@" ":" hasDevice
set target "c:@target@"
:hasDevice
insert @target@
moveto previous
if not match "^{.*}\\$" hasNoEndSlash
set target @1@
:hasNoEndSlash
delete
set dest @target@
if equal "@middle target 2 1@" "\" hasRoot
set target "@left target 2@\@middle target 2 999@"
:hasRoot

moveto netx
if error noNetx
moveto ipxodi
if error someNetware
moveto lsl
if error someNetware
moveto Driver
if error missingDriver
goto allOfIt

:noNetx
moveto ipxodi
if not error someNetware
moveto lsl
if not error someNetware
moveto Driver
if error noNetware
abort 199

:someNetware
abort 198

:missingDriver
moveto ipxodi
set changes yes
insert "@dest@\3c5x9"
moveto previous
tag Driver

:allOfIt
moveto login
if not error haveLogin
moveto netx
moveto next
set changes yes
set addedLogin yes
insert "@lastDrive@:\login\login"
moveto previous
tag login
:haveLogin
moveto lsl
if match "[a-z]:\\([a-z0-9_.]+\\)*lsl\.com" noChange
set changes yes
change "{([a-z]:)?\\?([a-z0-9_.]+\\)*}lsl(\.com)?" "@dest@\lsl.com"
:noChange
moveto Driver
if match "[a-z]:\\([a-z0-9_.]+\\)*3c5x9\.com" noChange
set changes yes
change "{([a-z]:)?\\?([a-z0-9_.]+\\)*}3c5x9(\.com)?" "@dest@\3c5x9.com"
:noChange
moveto ipxodi
if match "[a-z]:\\([a-z0-9_.]+\\)*ipxodi\.com" noChange
set changes yes
change "{([a-z]:)?\\?([a-z0-9_.]+\\)*}ipxodi(\.com)?" "@dest@\ipxodi.com"
:noChange
moveto netx
if match "[a-z]:\\([a-z0-9_.]+\\)*netx\.exe" noChange
set changes yes
change "{([a-z]:)?\\?([a-z0-9_.]+\\)*}netx(\.(com|exe))?" "@dest@\netx.exe"
:noChange
moveto login
if match "@lastDrive@:\\([a-z0-9_.]+\\)*login" noChange
set changes yes
change "{([a-z]:)?\\?([a-z0-9_.]+\\)*}login" "@lastDrive@:\login\login"
:noChange
goto writeTarget

:noNetware
set target "c:\nwclient"
set dest @target@
moveto end
:backupOne
moveto previous
if match "^[ ]*$" backupOne
if match "win" backupOne
if match "dosshell" backupOne
moveto next
set changes yes
insert ""
insert "@@echo off
insert "REM Netware startup
moveto previous
moveto next
insert "if not exist @dest@\lsl.com goto noNetware"
insert "if not exist @dest@\ipxodi.com goto noNetware"
insert "if not exist @dest@\netx.exe goto noNetware"
insert "@dest@\lsl.com"
insert "@dest@\3c5x9.com"
insert "@dest@\ipxodi.com"
insert "@dest@\netx.exe"
insert "@lastDrive@:\login\login"
set addedLogin yes
moveto previous
tag login
moveto next
insert "goto doneNetware"
insert ":noNetware"
insert "echo Netware client software missing, Netware not started"
insert ":doneNetware"

:writeTarget
if equal @addedLogin@ no doWriteTarget
moveto login
moveto next
set changes yes
insert "c:"
:doWriteTarget
write target.dat "@target@\n"
if equal @changes@ no abortAutoexec
exit
:abortAutoexec
abort 0

:* ***************************************************************************
:* edit the NET.CFG file.
:netcfg
set changes no
find "^link[ ]+driver[ ]+3c5x9[ ]*$"
if not error doneLinkDriver
moveto end
set changes yes
insert ""
insert "LINK DRIVER 3C5X9
insert ";
insert "; The following two parameters are required when using two or more EtherLink
insert "; III adapters in a single machine. These parameters specify which specific
insert "; EtherLink III adapter the driver is to attach itself to.
insert ";
insert "; PORT NNN, where NNN is the hex base address of the 3C509 ISA adapter
insert ";
insert "; SLOT NN, where NN is the slot number containing the 3C529, 3C579, or
insert "; 3C509 configured as an EISA adapter.
insert ";
insert "; PORT 200
insert "; SLOT 3
insert ";
insert "; The next line specifies the frame type. Since 3C5X9.COM is a 4.01 DOS
insert "; ODI driver, the driver default frame type is 802.2. If attaching to
insert "; a 3.11 server, the frame type is changed to 802.3.
insert ";
insert " FRAME ETHERNET_802.2
insert ";
:doneLinkDriver
if equal @changes@ no abortNetCfg
exit
:abortNetCfg
abort 0

:* ***************************************************************************
:* edit the NET.CFG file and change the frame type from 802.2 to 802.3
:framet
find "^[ ]+FRAME[ ]+ETHERNET_802.2"
if error abortnotfound
replace " FRAME ETHERNET_802.3
exit
:abortnotfound
abort 0