home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Today (UK) 4
/
CDRT4.iso
/
pc
/
bodydemo
/
setup.scr
< prev
next >
Wrap
Text File
|
1994-06-14
|
24KB
|
964 lines
rem ____ Start Script ____
rem we are already in the destination directory,
rem and ka.cnf points to the drive and directory we were installed from
indestdir
rem Make drive letter variables for the benefit of batch files launched by kav
getDriveLetter %CDroot%
set CDdrive %_1%
getDriveLetter %HDroot%
set HDdrive %_1%
rem set default values for a few things
preset AutoMovie On
preset mouseSensitivity 50
preset ExtraMemory Automatic
preset musicVolume 70
preset soundVolume 80
preset Printing Detect
preset PrinterPort LPT1
set digitizedSound On
preset music On
preset zoomUseRealSound Off
getSoundPort _ioPort _irq _dma _drq
getMusicPort _musicIo
set _soundMenuHeight 14
set _soundMenu sound.mnu
exist %CDRoot%\drivers\algdig.drv
if %_1% = 0
set _soundMenuHeight 10
set _soundMenu sound4.mnu
endif
rem Deal with power management for product.bat
set _power "rem power.exe not detected"
detect_power
if %_1% = 1
set _power "power off"
endif
rem set default tsr lines for product.bat
set _tsr "rem no special tsrs needed"
set _tsr2 "rem no special tsr cleanup needed"
rem Specify where all the text files used in setup live.
set _text %hdroot%\inst%LANG%.txl
rem
err_handler %_text%\errhand.txt
rem lk 12:35 3/27
rem --------- Disallow setup if in Windows ---------
rem getenv's argument is case sensitive; usually always uppercase,
rem but windir is lowercase. That way you can't set it from commandline!
getenv windir
if "%_1%" ne ""
rem by golly they're in windows;
textbox 1 1 80 25 blue
color back blue
beep 2
type %_text%\nowin.txt 10 11 60 7
waitkey_noesc
goto exit_unsaved
endif
rem lk 2:35 3/26 start
rem This check is to see if the CDROM is in the caddy when you run setup
rem because, if you don't you'll get a driver missing error.
:checkCd
existdir %CDRoot%\drivers
if %_1% = 0
textbox 1 1 25 80 blue
color back blue
beep 1
type %_text%\nocd.txt 15 10 50 7
waitKey_noEsc
switch "%_1%"
case escape:
goto exit_unsaved
case default:
endswitch
color back cyan
goto checkCd
endif
rem lk 2:49 3/26 end
rem
textbox 1 1 80 25 blue
color back cyan
getOpt -help
if %_err% = 0
type %_text%\setuphlp.txt 3 2 77 15 -border -nocenter
waitkey
goto exit_unsaved
endif
type %_text%\setup.txt 3 2 77 6 -border
color text yellow
echo 6 6 70 1 -center "%title%"
color text white
rem ----------------- select card --------------------
:card
textbox 1 9 80 17 blue
rem menu %_text%\sound.mnu 20 10 44 14 %_text%\sound.tit %_text%\updown.leg
menu %_text%\%_soundMenu% 20 10 44 %_soundMenuHeight% %_text%\sound.tit %_text%\updown.leg
set soundDriver %_1%
if %soundDriver% eq quit
goto exit_unsaved
endif
set musicDriver "%_2%"
set musicType "%_3%"
set music "%_4%"
set soundDevice "%_5%"
set _iomnu "%_6%"
set _irqmnu "%_7%"
set _dmamnu "%_8%"
set _soundDevice2 "%_9%"
if "%soundDevice%" eq -
set soundDevice "%_soundDevice2%"
endif
unset _dma
unset _irq
unset _ioPort
textbox 1 9 80 16 blue
rem set i/o port, etc.
set _musicIo "%_ioPort%"
set stopMovies On
rem don't run sbtest if this is really a Reveal card
switch %soundDevice%
case SC400:
set _reveal "-noAuto"
case SC600FM:
set _reveal "-noAuto"
case SC600GM:
set _reveal "-noAuto"
case SC600:
set _reveal "-noAuto"
case default:
set _reveal ""
endswitch
switch %soundDriver%
case escape:
goto exit_unsaved
case algdig.drv:
set soundVolume 80
case sbdig.drv:
detect_soundBlaster %_reveal%
set _musicIo "%_ioPort%"
case sbpdig.drv:
detect_soundBlaster
set soundVolume 80
set _musicIo "%_ioPort%"
case sb16dig.drv:
detect_soundBlaster
rem above command now sets _musicIo, but it should only be used
rem with roland music, i.e. if user has waveblaster daughter card.
if %musicType% eq adl
set _musicIo "%_ioPort%"
endif
rem Workaround for kav movie bug
if %musicType% eq rld
set stopMovies Off
endif
case pasdig.drv:
rem proaudio spectrum 16
rem detect settings from config.sys
detect_spectrum
set _sb_dma %_2%
rem if using 16 bit dma, punt and drop back to soundblaster emulation
rem is this right?
set _musicIo "%_ioPort%"
if %_dma% > 4
set soundDriver sbdig.drv
rem soundblaster emulation is normally dma channel 1
rem but use values detect_spectrum read from config.sys
detect_soundBlaster
set _dma %_sb_dma%
set _musicIo 388
endif
set soundVolume 70
case default:
rem explicit defaults
endswitch
rem hard-code default music io port
switch %musicDriver%
case adlib.drv:
set _musicIo 388
case adlibg.drv:
set _musicIo 388
case roland.drv:
if %soundDriver% ne sb16dig.drv
set _musicIo 330
endif
case default
rem normal case
endswitch
set _musicTmp %music%
set _digiTmp %digitizedSound%
setSoundPort "%_ioPort%" "%_irq%" "%_dma%" "%_drq%"
setMusicPort "%_musicIo%"
set music %_musicTmp%
set digitizedSound %_digiTmp%
if "%soundDevice%" eq none
set digitizedSound Off
set music Off
endif
if "%soundDriver%" eq .none
set digitizedSound Off
endif
if "%musicDriver%" eq PCSPKR.DRV
set music Off
endif
if "%musicDriver%" eq .none
set music Off
endif
rem clear dma if it's set to the default
if "%_dma%" = -1
unset _dma
endif
color back white
color text black
textbox 1 25 80 1
type %_text%\settings.txt 1 25 80 1
color back cyan
color text white
rem ----------------- prepend driver path -----------------
set _nakedSoundDriver %soundDriver%
appendSlash _cdroots %cdroot%
switch %soundDriver%
rem these three are pseudo drivers and dont really exist
case .none:
case .internal:
case sb16dig.drv:
rem all others are real
case default:
set soundDriver %_CDroots%drivers\%soundDriver%
exist %soundDriver%
if %_1% eq 0
rem driver does not exist
beep
type %_text%\sounderr.txt 10 10 60 9 -Border
waitkey
unset _soundDevice2
goto card
endif
endswitch
switch %musicDriver%
rem these three are pseudo drivers and dont really exist
case .none:
rem all others are real
case default:
set musicDriver %_CDroots%drivers\%musicDriver%
exist %musicDriver%
if %_1% eq 0
rem driver does not exist
beep
type %_text%\sounderr.txt 10 10 60 9 -Border
waitkey
unset _soundDevice2
goto card
endif
endswitch
rem ----------------- note any tsr's needed for this card -------------
closeDrivers
unset _sc600mode
rem set default tsr lines for product.bat
set _tsr "rem no special tsrs needed"
set _tsr2 "rem no special tsr cleanup needed"
set _vol1 "rem No special sound device"
set _vol2 "rem No special sound device cleanup"
switch %soundDevice%
case GRAVIS:
rem gravis ultrasound
set _tsr "ultrasnd.exe -c -d %HDroot%"
set _tsr2 "ultrasnd.exe -f"
if %CDroot% ne %HDroot%
copy ultramid.ini
copy ultrasnd.exe
endif
case SC600:
rem Reveal SC600 in native general midi mode
set _sc600mode GM
case SC600FM:
rem Reveal SC600 in Sound Blaster (FM) mode
set _sc600mode FM
case default:
endswitch
if "%_sc600mode%" ne ""
rem getenv SNDSCAPE
rem set _tsr "%_1%\ssinit %_sc600mode% /w"
set _tsr "%hdroot%\callss %_sc600mode% /w"
set _vol1 "%hdroot%\ssvol 127 110 100"
set _vol2 "%hdroot%\ssvol /r"
unset _sc600mode
rem ssinit is not a tsr, so we can run it now.
spawn %_tsr%
spawn %_vol1%
textbox 1 1 80 25 blue
color back white
color text black
type %_text%\settings.txt 1 25 80 1
color back cyan
color text white
type %_text%\setup.txt 3 2 77 6 -border
color text yellow
echo 6 6 70 1 -center "%title%"
color text white
openDrivers
endif
rem ----------------- auto music & sound -----------------
rem Automatically play music and sound unless ? option is given on
rem command line
getOpt ?
if %_err% = 0
goto loop
endif
if %musicType% ne -
color back blue
color text yellow blink
type %_text%\pmusic.txt 20 20 40 1
color text white
type %_text%\playing.txt 5 21 70 4
rem show them which menu item would have gotten them here, more or less.
color back cyan
menu %_text%\main.mnu 19 10 44 9 %_text%\main.tit %_text%\updown.leg -default 0 -showOnly
music kalogo.%musicType%
endif
rem getenv's argument is case sensitive; usually always uppercase,
rem but windir is lowercase. That way you can't set it from commandline!
getenv windir
if "%_1%" ne ""
rem by golly they're in windows;
rem don't use the PC Speaker because the driver isn't installed yet
switch %soundDevice%
case PCspeaker:
goto noAutoSoundTest
case default:
endswitch
endif
if %digitizedSound% ne Off
color back blue
color text yellow blink
type %_text%\psound.txt 20 20 40 1
color text white
type %_text%\playing.txt 5 21 70 4
rem show them which menu item would have gotten them here, more or less.
color back cyan
menu %_text%\main.mnu 19 10 44 9 %_text%\main.tit %_text%\updown.leg -default 1 -showOnly
sound knowledg.voc
endif
:noAutoSoundTest
rem default after automatic test is to save and exit
set _mainDef 4
textbox 5 20 70 5 blue
goto loop_noclear
:loop
rem ----------------- select function --------------------
textbox 1 9 80 16 blue
:loop_noclear
color back white
color text black
textbox 1 25 80 1
type %_text%\settings.txt 1 25 80 1
color back cyan
color text white
menu %_text%\main.mnu 19 10 44 9 %_text%\main.tit %_text%\updown.leg -default %_mainDef%
set _mainDef 0
switch %_1%
case exit:
goto exit
case escape:
goto card
case card:
goto card
case music:
if "%musicType%" ne -
color back blue
color text yellow blink
type %_text%\pmusic.txt 20 20 40 1
color text white
type %_text%\playing.txt 5 21 70 4
music kalogo.%musicType%
endif
case sound:
if "%soundDriver%" ne .none
color back blue
color text yellow blink
type %_text%\psound.txt 20 20 40 1
color text white
type %_text%\playing.txt 5 21 70 4
sound knowledg.voc
endif
case settings:
goto settings
endswitch
goto loop
:settings
rem
rem ----------------- LK OPTION MENU --------------------
rem Needed files are: all files preceded by "o_", settings.txt, updown.leg,
rem and setup.txt
textbox 1 1 80 25 blue
color back cyan
indestdir
rem detect characteristics of user's system
getDiskFree
rem set Diskfree %_1%
getMemFree
rem set memfree %_1%
detect_windows_dir
rem set windows_dir %_1%
color back blue
rem type %_text%\ereg.txt 5 21 70 4
color back cyan
set _next 0
getSoundPort _ioport _irq _dma _drq
getMusicPort _musicIo
:o_main_loop_clear
textbox 1 1 80 25 Blue
:o_main_loop
color back white
color text black
textbox 1 25 80 1
type %_text%\settings.txt 1 25 80 1
color back cyan
color text white
menu %_text%\o_option.mnu 4 3 74 19 %_text%\o_option.tit %_text%\o_tog.leg -default %_next% -anyKey
set _type %_1%
set _line "%_2%"
set _var "%_3%"
set _next "%_4%"
set _ch1 "%_5%"
set _ch2 "%_6%"
switch %_type%
case escape:
textbox 1 1 80 25 Blue
type %_text%\setup.txt 3 2 77 6 -border
color text yellow
echo 6 6 70 1 -center "%title%"
color text white
goto loop
case quit:
set _musicTmp %music%
set _digiTmp %digitizedSound%
setSoundPort "%_ioPort%" "%_irq%" "%_dma%" "%_drq%"
setMusicPort "%_musicIo%"
set music %_musicTmp%
set digitizedSound %_digiTmp%
textbox 1 1 80 25 Blue
type %_text%\setup.txt 3 2 77 6 -border
color text yellow
echo 6 6 70 1 -center "%title%"
color text white
goto loop
case quitSave:
set _musicTmp %music%
set _digiTmp %digitizedSound%
setSoundPort "%_ioPort%" "%_irq%" "%_dma%" "%_drq%"
setMusicPort "%_musicIo%"
set music %_musicTmp%
set digitizedSound %_digiTmp%
saveconfig
textbox 1 1 80 25 Blue
type %_text%\setup.txt 3 2 77 6 -border
color text yellow
echo 6 6 70 1 -center "%title%"
color text white
goto loop
case ENUM:
rem either one or the other
set_eval _inVar %%%_var%%%
if "%_inVar%" eq "%_ch1%"
set %_var% "%_ch2%"
endif
if "%_inVar%" eq "%_ch2%"
set %_var% "%_ch1%"
endif
if "%_inVar%" eq ""
set %_var% "%_ch1%"
endif
if "%_1%" ne ""
readKey
endif
case BOOL:
rem either On / Off
set_eval _inVar %%%_var%%%
if "%_inVar%" eq "On"
set %_var% "Off"
endif
if "%_inVar%" eq "Off"
set %_var% "On"
endif
if "%_inVar%" eq ""
set %_var% "On"
endif
if "%_1%" ne ""
readKey
endif
case LINE:
rem Open entry
set_eval _inVar %%%_var%%%
rem Prompt coordinates are tied closely to menu coordinates.
set _o_tmp %_line%
sub _o_tmp 1
echo 36 %_o_tmp% 36 1
promptdir "" 34 %_line% 38 1 -any
if "%_1%" eq escape
goto o_main_loop
endif
if "%_1%" ne escape
set %_var% "%_1%"
endif
case PRCT:
rem Percentage 0-100
set_eval _inVar %%%_var%%%
rem lk 3/26/94 start
rem next four ifs are exceptions because SBDIG.DRV and PCSPKR.DRV
rem doesn't handle soundVolume
if "%_var%" ne SoundVolume
goto o_noDriver
endif
set _noChangeVol 0
if "%_nakedSoundDriver%" eq PCSPKR.DRV
set _noChangeVol 1
endif
if "%_nakedSoundDriver%" eq SBDIG.DRV
set _noChangeVol 1
endif
if "%_noChangeVol%" > 0
set soundVolume 100
beep 1
sub _next 1
textbox 1 1 80 24 blue
color back blue
type %_text%\o_novol.txt 18 10 44 4
color back cyan
waitKey_noesc
textbox 10 21 60 4 blue
goto o_main_loop
endif
unset _noChangeVol
:o_noDriver
rem lk 3/26/94 end
rem Prompt coordinates are tied closely to menu coordinates.
set _o_tmp %_line%
sub _o_tmp 1
color back lightmagenta
echo 36 %_o_tmp% 30 1 " ] "
promptdir "" 34 %_line% 5 1 -any
color back cyan
if "%_1%" eq escape
goto o_main_loop
endif
if "%_1%" < 1
beep 1
sub _next 1
goto o_main_loop
endif
if "%_1%" > 100
beep 1
sub _next 1
goto o_main_loop
endif
if "%_1%" ne escape
set %_var% "%_1%"
endif
case INT:
rem Any number specified in menu
set_eval _inVar %%%_var%%%
rem Prompt coordinates are tied closely to menu coordinates.
set _o_tmp %_line%
sub _o_tmp 1
echo 36 %_o_tmp% 36 1
rem Use _min=1 to stop input of strings
promptdir "" 34 %_line% 38 1 -any
if "%_1%" eq escape
goto o_main_loop
endif
if "%_1%" < %_ch1%
beep 1
sub _next 1
goto o_main_loop
endif
if "%_1%" > %_ch2%
beep 1
sub _next 1
goto o_main_loop
endif
if "%_1%" ne escape
set %_var% "%_1%"
endif
case DIR:
rem expect a path
set_eval _inVar %%%_var%%%
rem Prompt coordinates are tied closely to menu coordinates.
set _o_tmp %_line%
sub _o_tmp 1
color back lightmagenta
echo 36 %_o_tmp% 39 1 " ]"
promptdir "" 34 %_line% 39 1
color back cyan
if "%_1%" eq escape
goto o_main_loop
endif
if "%_1%" ne escape
set %_var% "%_1%"
endif
case SMIO:
rem
rem ----------------- select music i/o adr --------------------
textbox 1 1 80 25 blue
textbox 1 9 80 16 blue
menu %_text%\o_io.mnu 19 11 44 12 %_text%\o_io.tit %_text%\updown.leg -anyKey
textbox 1 9 80 16 blue
if %_1% eq escape
goto o_main_loop_clear
endif
set "_musicIo" "%_1%"
textbox 1 1 80 25 blue
rem
case SIO:
if %_ioMnu% eq -
goto o_main_loop
endif
rem
rem ----------------- select i/o adr --------------------
textbox 1 1 80 25 blue
textbox 1 9 80 16 blue
menu %_text%\o_ioMnu.mnu 19 11 44 12 %_text%\o_io.tit %_text%\updown.leg -literal "%_ioMnu%"
textbox 1 9 80 16 blue
if %_1% eq escape
goto o_main_loop_clear
endif
set _ioPort %_1%
textbox 1 1 80 25 blue
rem
case SIRQ:
if %_irqMnu% eq -
goto o_main_loop
endif
rem
rem ----------------- select IRQ --------------------
textbox 1 1 80 25 blue
menu %_text%\o_irqMnu.mnu 19 11 44 12 %_text%\o_irq.tit %_text%\updown.leg -literal "%_irqMnu%"
if %_1% eq escape
goto o_main_loop_clear
endif
set _irq %_1%
textbox 1 1 80 25 blue
case SDMA:
if %_dmaMnu% eq -
goto o_main_loop
endif
rem
rem ----------------- select DMA --------------------
textbox 1 1 80 25 blue
menu %_text%\o_dmaMnu.mnu 19 11 44 10 %_text%\o_dma.tit %_text%\updown.leg -literal "%_dmaMnu%"
if %_1% eq escape
goto o_main_loop_clear
endif
set _dma %_1%
textbox 1 1 80 25 blue
endswitch
goto o_main_loop
inDestDir
goto out
set _follow 0
set _next 1
textbox 1 1 80 25 blue
rem
rem ----------------- END LK OPTIONS --------------------
:exit
rem ---------- set up sound files ---------
set _musicTmp %music%
set _digiTmp %digitizedSound%
setSoundPort "%_ioPort%" "%_irq%" "%_dma%" "%_drq%"
setMusicPort "%_musicIo%"
set music %_musicTmp%
set digitizedSound %_digiTmp%
saveconfig
rem this section will change for each product!
rem copy the music archive for each zoomscape and kav.
exist ka.%musicType%
if %_1% = 0
goto no_music_archive
endif
if %musicType% ne -
textbox 1 9 80 17 blue
color back blue
color text yellow
type %_text%\copying4.txt 1 15 80 1
color back cyan
color text white
copy ka.%musicType% ka.mus
endif
:no_music_archive
rem ---------- copy driver files -----------
copy %_text%\product.bat %shortTitle%.bat -expand
rem ---------- select how much to install -----------
rem feeble attempt to make setup script sense whether subset archives exist.
rem caution: cdrom burner refuses to create empty directories
existdir %cdroot%\cache2
if %_1% = 0
goto cache_done
endif
:cache
textbox 1 9 80 17 blue
beep 2
type %_text%\cache.txt 6 18 68 6 -border
menu %_text%\cache.mnu 19 10 44 6 %_text%\cache.tit %_text%\updown.leg
textbox 1 9 80 17 blue
set _choice %_1%
set _needDisk "%_2%"
if %_choice% eq escape
goto loop
endif
rem delete old copy of cache files, if any. assume there are two caches.
copy cache1 %hdroot% -dir -uncopy
copy cache2 %hdroot% -dir -uncopy
set _diskWarning diskfre2.txt
detect_compressedDisk
if %_1% = 1
set _diskWarning dskcfre2.txt
add _needDisk %_needDisk%
endif
getdiskfree
set _gotDisk %_1%
if %_gotDisk% < %_needDisk%
beep
type %_text%\%_diskWarning% 10 15 60 8 -border
waitkey_noesc
switch %_1%
case escape:
goto exit_unsaved
case default:
endswitch
goto cache
endif
color back blue
color text yellow
type %_text%\copying3.txt 17 19 50 6
color back cyan
color text white
rem copy chosen set of quick access files
copy cache%_choice% %hdroot% -dir
rem copy cachex%_choice% %hdroot% -dir -expand
:cache_done
color back cyan
rem ---------- check and modify config.sys ------------
detect_files
set _nfiles %_1%
set _cfiles %_2%
rem _nfiles is how many files could actually be opened when pictext.exe started
rem _cfiles is the argument to FILES= in CONFIG.SYS
rem _nfiles is often less than _cfiles
set _needfiles 17
set _setfiles 20
if %_nfiles% >= %_needfiles%
goto files_done
endif
rem they don't have enough file handles. Is it because of CONFIG.SYS?
if %_cfiles% >= %_setfiles%
rem nope. Don't offer to change CONFIG.SYS.
textbox 1 9 80 17 blue
beep 1
type %_text%\files2.txt 7 11 70 13 -border
waitkey
goto files_done
endif
rem Their CONFIG.SYS needs changing.
:addfiles
textbox 1 9 80 17 blue
beep 2
type %_text%\files.txt 10 11 63 13 %_text%\files.tit %_text%\yesno.leg
waitkey_noesc
switch %_1%
case %yes%:
set_files %_setfiles%
beep
type %_text%\didfiles.txt 10 11 63 13 -border
waitkey_noesc
case %no%:
rem do nothing
case escape:
rem do nothing
case default:
goto addfiles
endswitch
textbox 1 9 80 17 blue
:files_done
rem ---------- check windows, set up icons, dma, and realsound driver ---------
set _winWarning anykey.txt
detect_windows_dir
set _windir %_1%
if %_windir% eq "none"
goto no_windows
endif
:do_windows
textbox 1 9 80 17 blue
beep 2
type %_text%\windows.txt 9 11 65 8 %_text%\windows.tit %_text%\yesno.leg
waitkey_noesc
switch %_1%
case %yes%:
rem copy files needed by windows code
copy kagroup.exe %_windir%\kagroup.exe
exist %_windir%\kagroup.inf
if %_1% = 0
copy %_text%\kagroup.hdr %_windir%\kagroup.inf -expand
endif
copy %_text%\kagroup.inf %_windir%\kagroup.inf -expand -append
rem when setting up windows, only load device driver if needed
rem perhaps this should be part of menu file rather than special
rem case code.
if "%soundDevice%" eq "PCSpeaker"
appendSlash _hdroots %hdroot%
setup_windows %_windir% %_HDRoots%vrsd.386
endif
if "%soundDevice%" ne "PCSpeaker"
setup_windows %_windir%
endif
textbox 1 9 80 17 blue
beep
type %_text%\windone.txt 10 11 63 11 -border
set _winWarning windone2.txt
waitkey
case %no%:
rem do nothing
case escape:
rem do nothing
case default:
goto do_windows
endswitch
:no_windows
rem ---------- check for ereg option ----------
exist %hdroot%\ereg.on
if %_1% = 0
goto no_ereg
endif
:test_ereg
textbox 1 9 80 17 blue
beep 2
type %_text%\ereg.txt 9 11 65 11 %_text%\ereg.tit %_text%\yesno.leg
waitkey_noesc
switch %_1%
case %yes%:
rem fall through to ereg.
case %no%:
goto no_ereg
case escape:
goto no_ereg
case default:
goto test_ereg
endswitch
rem On-line registration.
textbox 1 1 80 25 blue
color back cyan
rem detect characteristics of user's system
getDiskFree
set Diskfree %_1%
getMemFree
set memfree %_1%
detect_windows_dir
set windows_dir %_1%
detect_compressedDisk
set compressed %_1%
color back blue
type %_text%\e_ereg.txt 5 22 70 4
color back cyan
set _next 0
:ereg_loop
menu %_text%\e_ereg.mnu 6 2 70 18 %_text%\e_ereg.tit %_text%\e_ereg.leg -default %_next% -anyKey
set _choice %_1%
set _next "%_2%"
set _line "%_3%"
switch %_choice%
case escape:
goto ereg_done
case quit:
goto ereg_done
case save:
saveconfig
goto ereg_register
case default:
set_eval _val %%%_choice%%%
rem promptdir "%_val%" 5 19 60 6 %_text%\e_entry.tit %_text%\e_entry.txt -any
rem Prompt coordinates are tied closely to menu coordinates.
promptdir "%_val%" 36 %_line% 36 1 -any
if "%_1%" ne escape
set %_choice% "%_1%"
endif
rem textbox 5 19 52 7 blue
endswitch
goto ereg_loop
:ereg_register
rem second menu
preset |prefix 1
set _next 0
:ereg_register_loop
textbox 1 1 80 25 blue
menu %_text%\e_dial.mnu 6 10 70 8 %_text%\e_dial.tit %_text%\e_dial.leg -default %_next%
set _choice %_1%
set _phone "%_2%"
switch %_choice%
case escape:
goto done
case quit:
goto done
case |prefix:
set_eval _val %%%_choice%%%
rem Prompt coordinates are tied closely to menu coordinates.
textbox 1 1 80 25 blue
promptdir "%_val%" 20 10 40 6 %_text%\e_prefix.tit %_text%\e_prefix.leg
if "%_1%" ne escape
set %_choice% "%_1%"
endif
set _next 1
goto ereg_register_loop
case toll:
case tollfree:
endswitch
textbox 1 1 80 25 blue
color back blue
type %_text%\e_dialin.txt 12 5 54 5
color back cyan
register_via_modem %|prefix%%_phone%
set _bad %_err%
if %_bad% = 0
textbox 1 1 80 25 blue
type %_text%\e_done.txt 5 10 72 10 -border
endif
if %_bad% != 0
textbox 1 1 80 25 blue
type %_text%\e_err.txt 5 10 72 10 -border
endif
waitkey_noesc
:ereg_done
:no_ereg
rem ---------- all done. print trailer messages. ----------
color back black
color text white
textbox 1 1 80 25 black
type %_text%\done.txt 1 1 80 15
if "%soundDevice%" eq "DIGISP"
type %_text%\bmaster.txt 1 16 80 4
endif
if "%soundDevice%" eq "ARIA"
type %_text%\aria.txt 1 16 80 4
endif
if "%soundDevice%" eq "RLDSC"
type %_text%\roland.txt 1 16 80 4
endif
rem since we're invoked with kawin, don't need to tell them to restart windows
rem However, this code is used to pause the setup screen when run from Windows.
getenv windir
if "%_1%" ne ""
beep
type %_text%\%_winWarning% 1 21 80 4
rem pause if their window might go away...
waitkey
set _waited 1
endif
rem Since this product's install is invoked by a shell, and
rem Larry wants it to loop, pause so the final message doesn't
rem get obliterated. Should only do this if invoked by install.
if "%_waited%" ne 1
type %_text%\anykey.txt 1 21 80 4
waitkey
endif
goto final_exit
:exit_unsaved
textbox 1 1 80 25 black
:final_exit
___ENDSCRIPT___