home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 April (Special)
/
Chip-Special_1997-04_cd.bin
/
mediavis
/
xdiag
/
mvdxdiag.exe
/
TCD.DAT
< prev
next >
Wrap
Text File
|
1995-03-01
|
14KB
|
346 lines
include tcdglb.dat
set buf_scratch type str ""
set fun_testcdsecs type long $secs
set fun_testcddialog type str ""
menu TESTCD dims 25,80 bc blu tc wh bo no na " Media Vision Diagnostics, version 2.4 "
text at ,2 " CDROM Interface and Operation Test "
box at ,2 dims 0,35 border double
text " Welcome to the automated CD-ROM drive operation test. The Installation"
text "program will automatically add this program to your AUTOEXEC.BAT to test the"
text "CD-ROM drive's current status. If you have found yourself in this program"
text "it is because of two reasons. You have just installed a new kit and it ran"
text "automatically and found a problem, or you ran this program directly."
text " If you have found yourself in this program and don't need to know the"
text "current status of your CD-ROM, select 'Exit this Screen' below, and your"
text "system will continue to boot normally. However, your CD-ROM drive may not"
text "be working at this time. "
text
text "Highlight 'Read CDROM Configuration' and press ENTER to begin the procedure."
text
box at ,C dims 7,50 bo do bc cy tc btwhi
item at ,20 " Additional Information on this program" execute "$prg_lookat tcd_hint.hlp" textcolor btwhi background cy
item at ,C " Read CDROM Configuration " menu ReadCDROMConfiguration background cy textcolor btwhi
item at ,C " Verify CDROM Operation " menu VerifyCDROMOperation$var_CDROMReady background cy textcolor btwhi
item at ,C " CDROM Information " menu DisplayCDROMInformation background cy textcolor btwhi
item at ,C " Exit this Screen " Return 1 background cy textcolor btwhi
item script testcdfun everytime
box at 22,0 dims 3,80 border single
hotkey F1 TESTCDHelp
hotkey F2 TESTCDAbout
hotkey F3 TESTCDExit
hotkey F4 TESTCDReset
hotkey F5 TESTCDSetGlobals
hotkey F10 ManualCDROM
script testcdfun
local cursecs type long $secs
if isless $cursecs $fun_testcdsecs return
set fun_testcddialog "$fun_testcddialog" - "*\n"
if ! $_strop then
display " " at 23,2 dims 1,77 background blue textcolor white
set fun_testcddialog type str `file tcd.dlg
if $fun_testcdsecs display fun_testcddialog at 23,2 dims 1,77 background blue textcolor white
set fun_testcdsecs $cursecs + 4
else
set fun_testcdsecs $cursecs + 4
display fun_testcddialog at 23,2 dims 1,77 background blue textcolor white
endif
return
script quietTESTCD
runscript FindCDROMConfig
runscript FindCDROMAutoex
if issame "${lin_CONFIGCDROM}" "" goto gointeractive
if issame "${v_namcdromd1}" "" goto gointeractive
if not isfile ${v_namcdromd1} if isequal $v_usemcam 1 if issame "${lin_CONFIGMCAM}" "" goto addmcamreboot
if not isfile ${v_namcdromd1} goto gointeractive
if issame "${lin_AUTOEXCDROM}" "" goto gointeractive
set var_mscdexstatus type int 0
interrupt 2Fh ax 1500h bx 0 return bx var_mscdexstatus
if isequal $var_mscdexstatus 0 goto gointeractive
set buf_scratch " "
local ptr type ptr &buf_scratch
sedit -B C:\ autoexec.bat testcd dummy put $ptr
set x `length "${buf_scratch}"
if isequal $x 0 goto autoexremovedone
local buf type str ""
local y 1
:next
set buf "${buf} "
set y ++
if isless $y $x goto next
sedit -wqnB ${v_bootdrv}${v_bootdir} autoexec.bat testcd "${buf}" substitute
:autoexremovedone
runscript DoInternationalStuff
return
:gointeractive
runmenu TESTCD
return
:addmcamreboot
runscript InsertCONFIGMCAM
runscript delay5Warmboot
goto gointeractive
return
menu ManualCDROM at 0,0 dims 25,80 bc bla tc wh bo do na " Manually Modify Drivers "
runscript FindCDROMConfig
runscript BuildCONFIGCDROMline
runscript FindCDROMAutoex
runscript BuildAUTOEXCDROMline
text "Displayed below are either the actual lines from CONFIG.SYS and AUTOEXEC.BAT"
text "for your CDROM Drivers, or default lines built by this program."
text
text "Edit the lines as desired, then highlight 'Update ..., now' to update either"
text "CONFIG.SYS or AUTOEXEC.BAT with the new lines."
text
text "This operation is provided here to expedite Tech Support activities; you"
text "should use the Main Menu's 'Read CDROM Configuration' item, as it does this"
text "same sort of action, but only when it determines that there is a problem."
text
text
box at 12,-1 dims 3,74 border single shadow
text at 12,5 " CONFIG.SYS "
item $lin_CONFIGCDROM dims 1,70 script "getTextLine lin_CONFIGCDROM"
text
box at 15,-1 dims 3,74 border single shadow
text at 15,5 " AUTOEXEC.BAT "
item $lin_AUTOEXCDROM dims 1,70 script "getTextLine lin_AUTOEXCDROM"
text
box at ,-1 dims 5,40 border single shadow
item at ,-1 " Return to Previous Screen " return 1
item at ,-1 " Update CONFIG.SYS, now " script addCONFIGCDROM
item at ,-1 " Update AUTOEXEC.BAT, now " script addAUTOEXCDROM
menu TESTCDSetGlobals at 0,0 dims 25,80 bc bla tc wh bo no na " Set Global Variables "
set tmpFilename type str ""
text at 1,2
text using "%30s" "QCFG .ini file:"
text
text using "%30s" "CONFIG.SYS driver:"
text using "%30s" "Boot Drive:"
text using "%30s" "Boot Directory:"
text using "%30s" "Windows Path:"
text
text using "%30s" "CONFIG.SYS CDROM driver:"
text using "%30s" "CDROM '/D:' name:"
text using "%30s" "CDROM '/B:' port:"
text using "%30s" "AUTOEXEC.BAT CDROM driver:"
text
text using "%30s" "Resource Allocation File:"
text
text using "%30s" "FDCD Pre-Initializer:"
text using "%30s" "Use FDCD Pre-Initializer:"
text at 1,34
item $v_inifile dims 1,13 script "getFilename v_inifile" background blue textcolor white
text
item $v_namconfig dims 1,13 script "getFilename v_namconfig" background blue textcolor white
item $v_bootdrv dims 1,3 script "getDriveLetter v_bootdrv" background blue textcolor white
item $v_bootdir dims 1,40 script "getPathExisting v_bootdir" background blue textcolor white
item $v_winpath dims 1,40 script "getPathExisting v_winpath" background blue textcolor white
text
item $v_namcdrom dims 1,13 script "getFilename v_namcdrom" background blue textcolor white
item $c_devcdrom dims 1,13 script "getFilename c_devcdrom" background blue textcolor white
item $c_cdrport dims 1,4 script "getCDROMPORT c_cdrport" background blue textcolor white
item $v_mscdex dims 1,13 script "getFilename v_mscdex" background blue textcolor white
text
item $v_qafile dims 1,13 script "getFilename v_qafile" background blue textcolor white
text
item $v_mcamname dims 1,13 script "getFilename v_mcamname" background blue textcolor white
item $v_usemcam dims 1,4 set "arg1 $v_usemcam" script "toggleint v_usemcam" background blue textcolor white
text
box at ,-1 dims 5,40
item at ,-1 " Update GLOBALS " script TESTCDUpdateGlobals return 1
item at ,-1 " Use GLOBALS this time only" return 1
item at ,-1 " Reset GLOBALS to defaults" script TESTCDDefaultGlobals return 1
script TESTCDDefaultGlobals
set v_inifile type str qcfg.ini
set v_bootdrv type str C: ## change to "C:"
set v_bootdir type str \ ## change to "\"
set v_winpath type str C:\WINDOWS # path to Windows
set v_namcdrom type str $def_namcdrom # pick your cdrom driver name
set c_devcdrom type str $def_devcdrom
set c_cdrport type str $def_cdrport
set v_qafile type str scandos.txt
return
script TESTCDUpdateGlobals
local buf type str " "
local ptr type ptr &buf
local new type str ""
nullit buf
sedit -B . tcdglb.dat set+v_inifile dummy put $ptr
set new "$buf" - "^*#"
if ! $_strop set new ""
trim new
sedit -wnqB . tcdglb.dat set+v_inifile "set v_inifile type str $v_inifile #$new" substitute
nullit buf
sedit -B . tcdglb.dat set+v_bootdrv dummy put $ptr
set new "$buf" - "^*#"
if ! $_strop set new ""
trim new
sedit -wnqB . tcdglb.dat set+v_bootdrv "set v_bootdrv type str $v_bootdrv #$new" substitute
nullit buf
sedit -B . tcdglb.dat set+v_bootdir dummy put $ptr
set new "$buf" - "^*#"
if ! $_strop set new ""
trim new
sedit -wnqB . tcdglb.dat set+v_bootdir "set v_bootdir type str $v_bootdir #$new" substitute
nullit buf
sedit -B . tcdglb.dat set+v_winpath dummy put $ptr
set new "$buf" - "^*#"
if ! $_strop set new ""
trim new
sedit -wnqB . tcdglb.dat set+v_winpath "set v_winpath type str $v_winpath #$new" substitute
if isfile install.ini then
nullit buf
sedit -I . install.ini setup windir dummy put $ptr
set new "$buf" - "^*#"
if ! $_strop set new ""
trim new
sedit -wnqI . install.ini setup windir "${v_winpath}\" substitute
endif
nullit buf
sedit -B . tcdglb.dat set+v_namcdrom dummy put $ptr
set new "$buf" - "^*#"
if ! $_strop set new ""
trim new
sedit -wnqB . tcdglb.dat set+v_namcdrom "set v_namcdrom type str $v_namcdrom #$new" substitute
nullit buf
sedit -B . tcdglb.dat set+c_devcdrom dummy put $ptr
set new "$buf" - "^*#"
if ! $_strop set new ""
trim new
sedit -wnqB . tcdglb.dat set+c_devcdrom "set c_devcdrom type str $c_devcdrom #$new" substitute
if issame "${v_namcdrom}" "sjcd.sys" then
nullit buf
sedit -B . tcdglb.dat set+c_cdrport dummy put $ptr
set new "$buf" - "^*#"
if ! $_strop set new ""
trim new
sedit -wnqB . tcdglb.dat set+c_cdrport "set c_cdrport type str $c_cdrport #$new" substitute
nullit buf
sedit -B . tcdglb.dat set+c_cdrtype dummy put $ptr
set new "$buf" - "^*#"
if ! $_strop set new ""
trim new
sedit -wnqB . tcdglb.dat set+c_cdrtype "set c_cdrtype type str $c_cdrtype #$new" substitute
endif
nullit buf
sedit -B . tcdglb.dat set+v_qafile dummy put $ptr
set new "$buf" - "^*#"
if ! $_strop set new ""
trim new
sedit -wnqB . tcdglb.dat set+v_qafile "set v_qafile type str $v_qafile #$new" substitute
return
script DoInternationalStuff
local intlwindir type str " "
local intlwindirptr type ptr &intlwindir
local intllanguage type str " "
local intllanguageptr type ptr &intllanguage
# do Windows stuff?
sedit -I . install.ini setup windir d put $intlwindirptr
trim intlwindir
if issame "$intlwindir" "" return # no Windows directory
set intlwindir "$intlwindir" - "^*="
:trimspacewindir
set intlwindir "$intlwindir" - "^\w" if $$_strop goto trimspacewindir
# do International stuff?
sedit -I . install.ini setup language d locate # is there a "[setup] language=xxx"?
if ! $errorlevel return
sedit -I . install.ini setup language d put $intllanguageptr
trim intllanguage
if issame "$intllanguage" "" return # no language specified
set intllanguage "$intllanguage" - "^*="
:trimspace
set intllanguage "$intllanguage" - "^\w" if $$_strop goto trimspace
# find CDROM setup program
set nodiskerror 1
:findcdromdrive
local cdromdrive type str ""
if issame "$cdromdrive" "" if isfile d:\$intllanguage\setup.exe set cdromdrive "d:"
if issame "$cdromdrive" "" if isfile e:\$intllanguage\setup.exe set cdromdrive "e:"
if issame "$cdromdrive" "" if isfile f:\$intllanguage\setup.exe set cdromdrive "f:"
if issame "$cdromdrive" "" if isfile g:\$intllanguage\setup.exe set cdromdrive "g:"
if issame "$cdromdrive" "" if isfile h:\$intllanguage\setup.exe set cdromdrive "h:"
if issame "$cdromdrive" "" if isfile i:\$intllanguage\setup.exe set cdromdrive "i:"
if issame "$cdromdrive" "" if isfile j:\$intllanguage\setup.exe set cdromdrive "j:"
if issame "$cdromdrive" "" if isfile k:\$intllanguage\setup.exe set cdromdrive "k:"
if issame "$cdromdrive" "" runmenu PutWindowsCDInDrive
if ! $errorlevel goto findcdromdrive
if issame "$cdromdrive" "" runmenu NoWindowsCDInDrive return
set nodiskerror 0
sedit -wnqI $intlwindir win.ini windows run $cdromdrive\$intllanguage\setup.exe replace
execute $comspec /c echo ${v_winpath}\win.com >> ${v_bootdrv}${v_bootdir}autoexec.bat
return
menu PutWindowsCDInDrive at -1,-1 bc wh tc bla bo do sh name " Need CD " noescape
text
text at ,-1 "Can not find the Install CD!"
text
text at ,-1 "Please make sure the Install CD is in the CDROM Drive. This CD is"
text at ,-1 "required to continue the installation with Windows!"
text
box at ,-1 dims 4,60 bo do sh
item at ,-1 " Whoops! I just put the CD in the CDROM Drive! " set "errorlevel 0" return 1
item at ,-1 " The Install CD is in the CDROM Drive! " set "errorlevel 1" return 1
text
text
menu NoWindowsCDInDrive at -1,-1 bc re tc wh bo do sh name " Incomplete Install "
text
text at ,-1 "Can not find the Install CD!"
text
text at ,-1 "If you are sure the Install CD is in the CDROM Drive,"
text at ,-1 "and this program can not find it, then there is "
text at ,-1 "something wrong that is beyond this program's ability"
text at ,-1 "to correct!"
text
text at ,-1 "Please try to use your new CDROM Drive, and then run"
text at ,-1 "this program again."
text
text
include get.dat
include tcdhk.dat
include tcdrc.dat
include tcdvo.dat
include tcdi.dat