@Echo off
cls
if .%1==. goto error
rem if .%2==. goto error
echo.
echo þ Sound Blaster 16/32/64/AWE32/AWE64/AWE64Gold Install v1.1b
echo.
echo þ By Daniel Jorge Caetano (Correction on Creative Installs)
echo.
echo.
echo þ Unzipping Temporary Driver Files...
echo.
md sbtmp
Unzip.exe driver.zip -d .\sbtmp >nul
copy drivengl.icf .\sbtmp\control.icf >nul
cd sbtmp
echo.
echo þ Installing Drivers. Don't change the install directory. Change 
echo   the drive letter only.
echo þ Answer YES for ALL questions.
echo.
echo Push any key...
pause >nul
cls
install.exe
echo.
echo þ Sound Blaster 16/32/64/AWE32/AWE64/AWE64Gold Install v1.1b
echo.
echo þ By Daniel Jorge Caetano (Correction on Creative Installs)
echo.
echo.
echo þ Installation of Drivers Complete.
echo.
echo þ Deleting Temporary Files...
echo.
del .\readme\*.* /n >nul
del .\sb16\dll\*.* /n >nul
del .\sb16\driver\*.* /n >nul
del .\sbawe32\dll\*.* /n >nul
del .\sbawe32\driver\*.* /n >nul
del .\sbawe32\driver\sbk\*.* /n >nul
del *.* /n >nul
echo þ Removing Temporary Directories...
echo.
rd readme >nul
rd .\sb16\dll >nul
rd .\sb16\driver >nul
rd sb16 >nul
rd .\sbawe32\dll >nul
rd .\sbawe32\driver\sbk >nul
rd .\sbawe32\driver >nul
rd sbawe32 >nul
cd..
echo þ Unzipping Temporary Utilities Files...
echo.
Unzip.exe utils.zip -d .\sbtmp >nul
copy utilengl.icf .\sbtmp\control.icf >nul
cd sbtmp
echo.
echo þ Installing Utilities. Don't change the install directory. Change 
echo   the drive letter only.
echo þ Answer YES for ALL questions.
echo.
echo Push any key...
pause >nul
cls
install.exe
echo.
echo þ Sound Blaster 16/32/64/AWE32/AWE64/AWE64Gold Install v1.1b
echo.
echo þ By Daniel Jorge Caetano (Correction on Creative Installs)
echo.
echo.
echo þ Installation of Utilities Complete.
echo.
echo þ Deleting Temporary Files...
echo.
del .\browser\*.* /n >nul
del .\ctcd\*.* /n >nul
del .\ctmidi\*.* /n >nul
del .\ctmovie\*.* /n >nul
del .\ctovly\*.* /n >nul
del .\ctwav\*.* /n >nul
del .\dll\*.* /n >nul
del .\mixer\*.* /n >nul
del .\mosaic\*.* /n >nul
del .\text\*.* /n >nul
del *.* /n >nul
echo þ Removing Temporary Directories...
echo.
rd browser >nul
rd ctcd >nul
rd ctmidi >nul
rd ctmovie >nul
rd ctovly >nul
rd ctwav >nul
rd dll >nul
rd mixer >nul
rd mosaic >nul
rd text >nul
cd..
rd sbtmp
echo Push any key...
pause >nul
md %1\MMOS2\DSP >nul
cls
echo.
echo þ Sound Blaster 16/32/64/AWE32/AWE64/AWE64Gold Install v1.1b
echo.
echo þ By Daniel Jorge Caetano (Correction on Creative Installs)
echo.
echo.
echo þ Installing of Windows CSP Drivers for OS/2...
echo.
erase %1\MMOS2\DSP\*.* /n >nul
Unzip.exe csps.zip -d %1\MMOS2\DSP >nul
echo.
echo Push any key...
pause >nul

rem *** this will disable WinOS2/DOS support. This is NOT ready!
goto complete

if %2.==none. goto complete
if %2.==None. goto complete
if %2.==nOne. goto complete
if %2.==noNe. goto complete
if %2.==nonE. goto complete
if %2.==NOne. goto complete
if %2.==NoNe. goto complete
if %2.==NonE. goto complete
if %2.==NONe. goto complete
if %2.==NOnE. goto complete
if %2.==NONE. goto complete
if %2.==NoNE. goto complete
if %2.==NONE. goto complete
md %1\%2
erase %1\%2\*.* /n >nul
cls
echo.
echo þ Sound Blaster 16/32/64/AWE32/AWE64/AWE64Gold Install v1.1b
echo.
echo þ By Daniel Jorge Caetano (Correction on Creative Installs)
echo.
echo.
echo þ Installing DOS/WinOS2 Drivers...
echo.
Unzip.exe doswin.zip -d %1\%2 >nul
echo.
echo þ The DOS part of this Install will run now...
echo.
echo Push any key...
pause >nul
cls
%1\%2\install.bat %1 %2
goto complete

:complete
cls
echo.
echo þ Install Complete!
echo.
echo þ Remember, *BEFORE* the Shutdown YOU *MUST* change the lines on the
echo   CONFIG.SYS lines. Creative Labs install is full of mistakes, and one
echo   of then can crash your system. The changes are:
echo.
echo þ Find the line (note the path C:\SBOS2 is assumed):
echo      DEVICE=C:\SBOS2\SBAWED2.SYS ... /N:SBAUD1$
echo   or
echo      DEVICE=C:\SBOS2\SB16D2.SYS ... /N:SBAUD1$
echo.
echo   and *add* one     /P    on the end of this line.
echo.
echo þ Search for the line:
echo      DEVICE=C:\MMOS2\AUDIOVDD.SYS SBAUD1$
echo.
echo   and *add* one    REM    on the begin of the line (before the DEVICE)
echo.
echo Push Any Key...
pause>nul
goto end

:error
echo.
echo þ Sound Blaster 16/32/64/AWE32/AWE64/AWE64Gold Install
echo.
echo þ By Daniel Jorge Caetano (Correction on Creative Installs)
echo.
echo þ Usage:
echo.
rem echo       INSTALL [Drive]: [Path for DOS Install]
echo       INSTALL [Drive]:
echo.
rem echo   Where [Drive] is the drive letter where MMPM is installed, and
rem echo   [Path for DOS Install] is the path that you want to put the drivers
rem echo   for DOS/WinOS2. Note that this path can be one level deep only, and the
rem echo   support will be installed on the MMOS2 drive. If you don't want the DOS
rem echo   suport, type  NONE  as path for DOS Drivers Install.
echo   Where [Drive] is the drive letter where MMPM is installed.
echo.
rem echo þ Example: If your MMPM directory is on drive C: and DOS DRVs on C:\SBDOS,
echo þ Example: If your MMPM directory is on drive C:,
echo   type:
echo.
rem echo       INSTALL C: SBDOS
echo       INSTALL C:
echo.
echo (For Portuguese Installation, use INSTALLP instead)
echo.
goto end
:end




