/////////////////////////////////////////////////////////////////////////////
/* WARNING! WARNING! WARNING! WARNING! WARNING!	WARNING! WARNING! WARNING!
   !!!! Not For End-User To Change !!!!

   This is the Installation Script file for your Installation program. You
   must not modify this in any which way or else your installation process
   will be destroyed.

   WARNING! WARNING! WARNING! WARNING! WARNING!	WARNING! WARNING! WARNING! */
/////////////////////////////////////////////////////////////////////////////

//---------------------------------------------------------------------
// INSTALL.DAT
// Purpose: Script file for MAD16 Software Installation
// Last modify date: 02/04/94  DCWC/TWH
//---------------------------------------------------------------------
// This Installation Script is customizable by using only a Text Editor.
// This is the Master Copy Version for OPTi MAD16 Customer.
//
// *** Customization Information ***
// 0. Make Backup Copy of this file.
// 1. Change only Names: Company, File, Environmet Variable....
//    Blocks to customize:  @DefaultProject, @DefineVar and @DefineDisk
//    and Text Messages.
// 2. If you change the Environment Variable, make sure your CFG file to
//    use the same name. INSTALL will change the contain of that file.
// 3. Do not change the Flow Logic of the Script.
// 4. Test Run after change. make sure it still works fine.
//----------------------------------------------------------------------

@DefineProject
	@Name = "MAD16 Software" 		// Title Bar
	@Version = "2.05"			// Version Number
  	@OutDrive = C				// default installation Drive
  	@Subdir = "\\MAD16"			// Default installation Dir
	@Immediate = 1				// Immeduate On
@EndProject

// 
//      The following section displays the welcoming message during installation.
//

@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
@movecstr(1,2,95,"Ί                                                                        Ί")
@movecstr(2,2,95,"Ί                                                                        Ί") 
@movecstr(3,2,95,"Ί                                                                        Ί") 
@movecstr(4,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
    @movecstr(1,10,95,"                   OPTi Computers, Inc. ")
    @movecstr(2,10,95,"   OPTi MAD16 16-Bit Audio Device Software Installation")
    @movecstr(3,10,95,"                       Version @Version")

@display
  @movecstr(6,8,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
  @movecstr(7,8,,"Ί                                                         Ί")
  @movecstr(8,8,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
  @movecstr(7,9,,"     Welcome to the OPTi MAD16 Installation Program")
  @move(10,7,"This Install program will install @Name Version @Version ")
  @move(11,7,"onto your computer system and perform the following tasks:")
  @move(13,7,"  1.  Help setup CD-ROM interface options to your MAD16")
  @move(14,7,"  2.  Help setup hardware options for your MAD16")
  @move(15,7,"  3.  Copy all necessary drivers and sets up your system files")
  @move(16,7,"      to run your favorite Games and Multimedia Applications.")


  					@Pause
@EndDisplay

@DefineVars
		// CUSTOMization Info. for four DOS setup programs:
		// SETBAT, SETCFG, SETM16 and WSETUP.EXE
		// the following variables have to be set for the
		// OEM customers if they have their own progarm names

		@QString @Compnay = "OPTi"	  // company name
						  // not yet used.

		@QString @InitName = "m16init"	  // Init progarm Prefix

		@QString @DrvName = "mad16c.drv"  // base Driver name
		@QString @VxDName = "vmad16.386"  // VxD name
		@QString @ExtMidi = "m16midi.drv" // external MIDI driver

		@QString @EnvVar  = "MAD16"       // Environ. Variable
						  // and Config. File Name

		//@QString @BackName = "MAD" 	  // backup file extension
						  // not used yet.
		// 
		// Windows Directory
		//
		@QString @Windir = "\\windows"
		@QString @VS
		@QString @WS
		@Integer @getWin = 0
		//
		// CD variables
		//
		@QString @CDType
		@QString @CDBase
		@QString @CDIRQ = ""
		@QString @CDDRQ	= ""
		@QString @CDTypDesc = ""
		@QString @CDBasDesc = ""
		@QString @CDIRQDesc = "Disabled"
		@QString @CDDRQDesc = "Disabled"
		@QString @Port = "220"
		@QString @IRQ = "5"
		@QString @DRQ = "1"
		@Dir @windata = @Windir
		@Drive @windrive = C
		@Integer @CdDrv = 0
		@Integer @CdRomType = 1 //If Mitsumi then different DMA
					//0 means Mitsumi
		//
	       	// Temp. Query Variables
		//
		@Integer @choice = 0
		@QString @Answer = ""
		@QString @Tmp
		//
		// MAD16 Hardware settings
		//
		@QString @SBPort = "220"
		@QString @SBInt  = "5"
	        @QString @SBDma  = "1"
	        @QString @GamePort = "Disable"
		@QString @Hardware = ""
		//
		// System Files Update: YES/NO
		//
		@QString  @INI = "YES"
		@QString  @SYS = "YES"
		@QString  @BAT = "YES"
@EndVars


// Select Home Directory

HOMEPATH:

GETOUTDRIVE: 
	@GetOutDrive
		@Suppress A
		@Suppress B
		@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
		@movecstr(1,2,95,"Ί                                                                        Ί")
		@movecstr(2,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
		@movecstr(1,4,95,"        OPTi MAD16 16-Bit Audio Device Software Installation ")

		@movecstr(5,9,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
		@movecstr(6,9,,"Ί                                                           Ί")
		@movecstr(7,9,,"Ί                                                           Ί") 
		@movecstr(8,9,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
		@movecstr(6,11,,"  Select the hard disk drive where you like to install ")
		@movecstr(7,11,,"  @Name onto.")
		@LocalWindow(13,39)
	@EndOutDrive

@If (@Removable)
  @Display
	  You cannot install @Name onto a floppy drive!
	  Choose a hard disk drive.
					  @Pause
	  @Goto GETOUTDRIVE
  @EndDisplay
@EndIf

@GetSubdir
	@Cls
	@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(1,2,95,"Ί                                                                        Ί")
	@movecstr(2,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(1,4,95,"        OPTi MAD16 16-Bit Audio Device Software Installation ")

	@movecstr(5,9,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(6,9,,"Ί                                                           Ί")
	@movecstr(7,9,,"Ί                                                           Ί") 
	@movecstr(8,9,,"Ί                                                           Ί") 
	@movecstr(9,9,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(6,11,,"Enter the directory name where you like to install")
	@movecstr(7,11,,"@Name into. Press [Enter] to accept the ")
	@movecstr(8,11,,"default directory.")
	@LocalWindow(13,50)
  	@Prompt = "Which directory ([Enter] = @Subdir)?"
@EndSubdir

 @If (@choice != 0) 
  @Goto REVIEWSEL
 @EndIf

// Select Windows Directory

WINPATH:

@ClearGroup(a)
@ClearGroup(b)
@GetGroups

	@Cls	
	@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(1,2,95,"Ί                                                                        Ί")
	@movecstr(2,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(1,4,95,"        OPTi MAD16 16-Bit Audio Device Software Installation ")

	@movecstr(5,11,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(6,11,,"Ί                                                       Ί")
	@movecstr(7,11,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(6,13,,"Do you have MS Windows installed in your system? ")

	@LocalWindow(13,39)
	@Set a = "Yes"
	@Set b = "No"
@EndGroups

@getWin = 0
@windata = "\\WINDOWS"
@If ('a' [= @Group)
	@getWin = 1

	@GetOutDrive @windrive
		@Suppress A
		@Suppress B
		@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
		@movecstr(1,2,95,"Ί                                                                        Ί")
		@movecstr(2,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
		@movecstr(1,4,95,"        OPTi MAD16 16-Bit Audio Device Software Installation ")

		@movecstr(5,5,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
		@movecstr(6,5,,"Ί                                                                Ί")
		@movecstr(7,5,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
		@movecstr(6,7,,"Select the hard disk drive where your MS Windows is located...")
		@LocalWindow(13,39)
	@EndOutDrive

        @GetSubdir @windata
	@Cls
	@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(1,2,95,"Ί                                                                        Ί")
	@movecstr(2,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(1,4,95,"        OPTi MAD16 16-Bit Audio Device Software Installation ")

	@movecstr(5,13,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(6,13,,"Ί                                                  Ί")
	@movecstr(7,13,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(6,15,," Enter your Windows directory name below ...")
	@LocalWindow(12,50)
	@Prompt = "Windows Path ([Enter] = @windata)?"
        @EndSubdir

        @If (@DirExists("@windrive:\\@windata\\system"))
          @delete ("@windrive:\\@windata\\system\\midimap.mad")
	  //@rename ("@windrive:\\@windata\\system\\midimap.cfg", "midimap.mad")
        @Else
	  @Display



		  Your Windows path [@windrive:@windata] does not exist, 
		  please enter your valid Windows path name.


		  		@Pause
	  @windata = "\\WINDOWS"
	  @Goto WINPATH
	  @EndDisplay
        @EndIf    
    @WS = "@windrive:\\@windata"
@Else
    @WS = "No Windows Installed"
@EndIf

 @If (@choice != 0)
  @Goto REVIEWSEL
 @EndIf

// Select CD Options

CDSETUP:

//DCWC
@ClearOption(1111)
@ClearOption(1112)
@GetOption
	@cls
	@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(1,2,95,"Ί                                                                        Ί")
	@movecstr(2,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(1,4,95,"        OPTi MAD16 16-Bit Audio Device Software Installation ")
	@movecstr(4,8,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(5,8,,"Ί                                                            Ί")
	@movecstr(6,8,,"Ί                                                            Ί")
	@movecstr(7,8,,"Ί                                                            Ί")
	@movecstr(8,8,,"Ί                                                            Ί")
        @movecstr(9,8,,"Ί                                                            Ί")
       @movecstr(10,8,,"Ί                                                            Ί")
       @movecstr(11,8,,"Ί                                                            Ί")
       @movecstr(12,8,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(5,11,,"              MAD16 CD-ROM Interface Setup")
	@movecstr(6,11,,"             ΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔΔ")
	@movecstr(7,11,,"MAD16 Sound Card can also be used as a CD-ROM Interface")
	@movecstr(8,11,,"board. If you have a CD-ROM drive which is connected to")
        @movecstr(9,11,,"MAD16 Sound Card, the answer to the following question")
       @movecstr(10,11,,"is YES.")
       @movecstr(11,11,,"Do you have a CD-ROM installed with MAD16 Sound Card?")
	@LocalWindow(17,39)
	@Option 1111 = "Yes"
	@Option 1112 = "No"
@EndOption

@If (1111 [= @Option)
        @CdDrv = 1
	@Goto CDINSTALLED
@ElseIf (1112 [= @Option)
        @CdDrv = 0
	@CDTypDesc = "No CD-ROM Installed"
	@CDBasDesc = "Not Applicable"
	@CDIRQDesc = "Disabled"
	@CDDRQDesc = "Disabled"
	@If (@choice != 0)
 	  @Goto REVIEWSEL
	@Else
	  @Goto HARDSETUP
	@EndIf
@EndIf


CDINSTALLED:

@ClearOption(111)
@ClearOption(112)
@ClearOption(113)
@GetOption
	@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(1,2,95,"Ί                                                                        Ί")
	@movecstr(2,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(1,4,95,"        OPTi MAD16 16-Bit Audio Device Software Installation ")

	@movecstr(5,9,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(6,9,,"Ί                                                          Ί")
	@movecstr(7,9,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(6,11,,"Please select the CD-ROM type that you are using...")

	@LocalWindow(13,39)
	@Option 111 = "  SONY"
	@Option 112 = " MITSUMI"
	@Option 113 = "PANASONIC"
@EndOption


		@If (111 [= @Option)
			@CDType = "/T:S"
			@CDTypDesc = "SONY"
			@CDIRQDesc = "Disabled"
			@CDDRQDesc = "Disabled"
			@CDIRQ = ""		//set as default first
			@CDDRQ = ""		//set as default first
			@CdRomType = 1
		@ElseIf (112 [= @Option)
			@CDType = "/T:M"
			@CDTypDesc = "MITSUMI"
			@CDIRQ = "/I:10"	//set as default first
			@CDDRQ = ""		//set as default first
			@CDIRQDesc = "10"
			@CDDRQDesc = "Disabled"
			@CdRomType = 0
		@ElseIf (113 [= @Option)
			@CDType = "/T:P"
			@CDTypDesc = "PANASONIC"
			@CDIRQDesc = "Disabled"
			@CDDRQDesc = "Disabled"
			@CDIRQ = ""		//set as default first
			@CDDRQ = ""		//set as default first
			@CdRomType = 1
		@EndIf


DOCD:
@ClearOption(10)
@ClearOption(20)
@ClearOption(30)
@ClearOption(40)

	@GetOption
		@Cls
		@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
		@movecstr(1,2,95,"Ί                                                                        Ί")
		@movecstr(2,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
		@movecstr(1,4,95,"        OPTi MAD16 16-Bit Audio Device Software Installation ")

		@movecstr(5,7,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
		@movecstr(6,7,,"Ί                                                             Ί")
		@movecstr(7,7,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
		@movecstr(6,9,,"Please select the Base Address for your @CDTypDesc CD-ROM...")

		@LocalWindow(13,39)
		@Option 30 = "340"
		@Option 10 = "320"
		@Option 20 = "330"
		@Option 40 = "360"
	@EndOption

	@If (10 [= @Option)
		@CDBase = "/P:320"
		@CDBasDesc = "320"
	@ElseIf (20 [= @Option)
		@CDBase = "/P:330"
		@CDBasDesc = "330"
	@ElseIf (30 [= @Option)
		@CDBase = "/P:340"
		@CDBasDesc = "340"
	@ElseIf (40 [= @Option)
		@CDBase = "/P:360"
		@CDBasDesc = "360"
	@EndIf

//DCWC

@ClearOption(11)
@ClearOption(12)
@GetOption
	@Cls
	@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(1,2,95,"Ί                                                                        Ί")
	@movecstr(2,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(1,4,95,"        OPTi MAD16 16-Bit Audio Device Software Installation ")
	@movecstr(4,7,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(5,7,,"Ί                                                             Ί")
	@movecstr(6,7,,"Ί                                                             Ί")
	@movecstr(7,7,,"Ί                                                             Ί")
	@movecstr(8,7,,"Ί                                                             Ί")
	@movecstr(9,7,,"Ί                                                             Ί")
       @movecstr(10,7,,"Ί                                                             Ί")
       @movecstr(11,7,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(5,10,,"Do you wish to proceed with the default selection of the")
	@movecstr(6,10,,"Interrupts and DMA channels for your @CDTypDesc CD-ROM?")
        @movecstr(7,10,,"The default settings for your @CDTypDesc CD-ROM is:")
        @movecstr(9,10,,"               Interrupt:   @CDIRQDesc")
       @movecstr(10,10,,"             DMA Channel:   @CDDRQDesc")
	@LocalWindow(15,39)
	@Option 11 = "Defaults"
	@Option 12 = "Customize"
	Choose Defaults to proceed with the default settings or Customize
	to customize the Interrupts and DMA Channels.
@EndOption

@If (11 [= @Option)
	@VS = "@CDType @CDBase @CDIRQ @CDDRQ"
	@If (@choice != 0)
	  @Goto REVIEWSEL
	@Else
	  @Goto HARDSETUP
	@EndIf
@ElseIf (12 [= @Option)
	@Goto DOCDIRQDRQ
@EndIf


DOCDIRQDRQ:
@ClearOption(100)
@ClearOption(200)
@ClearOption(300)
@ClearOption(400)
@ClearOption(500)
@ClearOption(600)
@ClearOption(700)
@ClearOption(1000)
@ClearOption(2000)
@ClearOption(3000)
@ClearOption(4000)

	//Get CD-ROM Interrupt options
	@GetOption
		@Cls
		@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
		@movecstr(1,2,95,"Ί                                                                        Ί")
		@movecstr(2,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
		@movecstr(1,4,95,"        OPTi MAD16 16-Bit Audio Device Software Installation ")

		@movecstr(5,7,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
		@movecstr(6,7,,"Ί                                                             Ί")
		@movecstr(7,7,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
		@movecstr(6,9,," Please select the Interrupt for your @CDTypDesc CD-ROM...")

		@LocalWindow(14,39)
		@If (0 == @CdRomType)	//If Mitsumi
			@Option 500 = "   10"
			@Option 100 = "    3"
			@Option 200 = "    5"
			@Option 300 = "    7"
			@Option 400 = "    9"
			@Option 600 = "   11"
			@Option 700 = "Disabled"
		@Else
			@Option 700 = "Disabled"
			@Option 100 = "    3"
			@Option 200 = "    5"
			@Option 300 = "    7"
			@Option 400 = "    9"
			@Option 500 = "   10"
			@Option 600 = "   11"
		@EndIf
	@EndOption

	@If (100 [= @Option)
		@CDIRQ = "/I:3"
		@CDIRQDesc = "3"
	@ElseIf (200 [= @Option)
		@CDIRQ = "/I:5"
		@CDIRQDesc = "5"
	@ElseIf (300 [= @Option)
		@CDIRQ = "/I:7"
		@CDIRQDesc = "7"
	@ElseIf (400 [= @Option)
		@CDIRQ = "/I:9"
		@CDIRQDesc = "9"
	@ElseIf (500 [= @Option)
		@CDIRQ = "/I:10"
		@CDIRQDesc = "10"
	@ElseIf (600 [= @Option)
		@CDIRQ = "/I:11"
		@CDIRQDesc = "11"
	@ElseIf (700 [= @Option)
		@CDIRQ = ""
	@EndIf

	//Get CD-ROM DMA Channel
	@If (1 == @CdRomType)	//If not Mitsumi
		@GetOption
			@Cls
			@movecstr(0,2,95,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
			@movecstr(1,2,95,"Ί                                                                        Ί")
			@movecstr(2,2,95,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
			@movecstr(1,4,95,"        OPTi MAD16 16-Bit Audio Device Software Installation ")

			@movecstr(5,7,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
			@movecstr(6,7,,"Ί                                                             Ί")
			@movecstr(7,7,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
			@movecstr(6,9,," Please select the DMA Channel for your @CDTypDesc CD-ROM...")

			@LocalWindow(13,39)
			@Option 4000 = "Disabled"
			@Option 1000 = "    1"
			@Option 2000 = "    2"
			@Option 3000 = "    3"
		@EndOption

		@If (1000 [= @Option)
			@CDDRQ = "/D:1"
			@CDDRQDesc = "1"
		@ElseIf (2000 [= @Option)
			@CDDRQ = "/D:2"
			@CDDRQDesc = "2"
		@ElseIf (3000 [= @Option)
			@CDDRQ = "/D:3"
			@CDDRQDesc = "3"
		@ElseIf (4000 [= @Option)
			@CDDRQ = ""
		@EndIf
	@EndIf

	@VS = "@CDType @CDBase @CDIRQ @CDDRQ"


 @If (@choice != 0)
  @Goto REVIEWSEL
 @EndIf


HARDSETUP:

// MAD16 Hardware Initial Settings: SB mode, Port 220h, INT5, DMA1

@ClearOption(6)	 		// Accept
@ClearOption(666)		// Port 220
@ClearOption(6666)		// Interrupt: 5
@ClearOption(88)		// DMA 1
@ClearOption(888)		// Game Port: Disable
@ClearOption(8888)		// Reset All to Default

@GetOption
	@cls
	              ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
	              Ί     MAD16 Hardware Settings     Ί
	              ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
  This page allows you to configure your MAD16 Sound Card's Hardware
  Settings. If it is the first time that you are entering this page, the
  settings shown are the defaults. To make a change, select item and press
  the [Enter] key.  After you have made the changes you can still go back 
  to the default settings by selecting "Reset All to Defaults" and then 
  pressing the [Enter] key. 
  
  If you wish to change your MAD16 settings after Installation, the setup
  and configuration utility "M16INIT.EXE" allows you to do so. Just type
  "M16INIT" at the command prompt after you have reboot your system.

	@LocalWindow(19,39)
	@Option 6  	= "Accept the Settings shown below"
	@Option 666  	= "I/O Port:         @SBPort"
	@Option 6666 	= "Interrupt:        @SBInt"
	@Option 88  	= "DMA Channel:      @SBDma"
	@Option 888 	= "Game Port:        @GamePort"
	@Option 8888  	= "Reset All to Default"
@EndOption

  	// Hardware Main Selection

		@If (6 [= @Option)
		 	@Hardware = "@SBPort @SBInt @SBDma @GamePort"
			@Goto REVIEWSEL
		@ElseIf (666 [= @Option)
			@Goto SBPORTSEL
		@ElseIf (6666 [= @Option)
			@Goto SBINTSEL
		@ElseIf (88 [= @Option)
			@Goto SBDMASEL
		@ElseIf (888 [= @Option)
			@Goto GAMESEL
		@ElseIf (8888 [= @Option)
			@SBPort = "220"
		        @SBInt  = "5"
	                @SBDma  = "1"
	                @GamePort = "Disable"
			@Goto HARDSETUP
		@EndIf

SBPORTSEL:

@ClearOption(10)
@ClearOption(20)

	@GetOption
		@Cls

		@movecstr(5,7,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
		@movecstr(6,7,,"Ί                                                     Ί")
		@movecstr(7,7,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
		@movecstr(6,9,,"Select the Base Address for MAD16 Sound System ...")

		@LocalWindow(13,39)
		@Option 10 = "220"
		@Option 20 = "240"
	@EndOption

	@If (10 [= @Option)
	       @SBPort = "220"
	@Else
	       @SBPort = "240"
	@EndIf

	@Goto HARDSETUP


SBINTSEL:

@ClearOption(100)
@ClearOption(200)
@ClearOption(300)

	//Get Interrupt options
	@GetOption
		@Cls

		@movecstr(5,7,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
		@movecstr(6,7,,"Ί                                                   Ί")
		@movecstr(7,7,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
		@movecstr(6,9,,"Select the Interrupt for MAD16 Sound System ...")

		@LocalWindow(14,39)
		@Option 100 = "    5"
		@Option 200 = "    7"
		@Option 300 = "   11"
	@EndOption

	@If (100 [= @Option)
	 @SBInt = "5"
	@ElseIf (200 [= @Option)
	 @SBInt = "7"
	@Else
	 @SBInt = "11"
	@EndIf

	@Goto HARDSETUP

SBDMASEL:

//Get DMA Channel
@ClearOption(1000)
@ClearOption(2000)

		@GetOption
			@Cls
			@movecstr(5,7,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
			@movecstr(6,7,,"Ί                                                    Ί")
			@movecstr(7,7,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
			@movecstr(6,9,,"Select the DMA Channel for MAD16 Sound System ...")

			@LocalWindow(13,39)
			@Option 1000 = "    1"
			@Option 2000 = "    3"
		@EndOption

		@If (1000 [= @Option)
	 	 @SBDma = "1"
		@Else
		 @SBDma = "3"
		@EndIf

	@Goto HARDSETUP

GAMESEL:
	@If ("Disable" == "@GamePort")
	 @GamePort = "Enable"
	@Else
	 @GamePort = "Disable"
	@EndIf
	@Goto HARDSETUP


// Review Selections

//DCWC
REVIEWSEL:

 @Choice = 5
 @GetInteger  @choice

	@cls
	@movecstr(0,11,,"ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»")
	@movecstr(1,11,,"Ί                                                    Ί")
	@movecstr(2,11,,"ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ")
	@movecstr(1,16,,"   MAD16 Sound System Option Summary")
  	@movecstr(4,13,,"1. MAD16 Directory:   @OutDrive:\\@Subdir")
        @movecstr(6,13,,"2. Windows Directory: @WS")
	@movecstr(8,13,,"3. CD Options:        Type = @CDTypDesc")
	@movecstr(9,13,,"                      Address = @CDBasDesc")
       @movecstr(10,13,,"                      Interrupt = @CDIRQDesc")
       @movecstr(11,13,,"                      DMA Channel = @CDDRQDesc")
       @movecstr(13,13,,"4. Hardware Settings: I/O Port = @SBPort")
       @movecstr(14,13,,"                      Interrupt = @SBInt")
       @movecstr(15,13,,"                      DMA Channel = @SBDma")
       @movecstr(16,13,,"                      Game Port = @GamePort")
       @movecstr(18,13,,"5.  Accept all the above options.")


          @Prompt="Please type (1,2,3,4) to change options or ([Enter]=5) to continue: "

 @EndInteger

 @If (@choice > 5) 
   @Goto REVIEWSEL
 @ElseIf (@choice < 1) 
   @Goto REVIEWSEL
 @ElseIf (@choice == 1) 
   @Goto HOMEPATH
 @ElseIf (@choice == 2) 
   @Goto WINPATH
 @ElseIf (@choice == 3) 
   @Goto CDSETUP
 @ElseIf (@choice == 4) 
   @Goto HARDSETUP
 @EndIf

DEFINEDISK:
@Tmp = "@OutDrive:@Subdir"
@If (@Immediate == 1)
@DefineDisk
	@Label = "Disk #1"
	@BeginLib INSTALL.001
	@File M16INIT.EXE @Size 112868 @Out M16INIT.EXE
	@File MAD16.CFG @Size 448 @Out MAD16.CFG
	@File SNDTEST.WAV @Size 12854 @Out SNDTEST.WAV
	@File VOLTSR.EXE @Size 5008 @Out VOLTSR.EXE
	@File CDSETUP.SYS @Size 3645 @Out CDSETUP.SYS
	@File KARAOKE.EXE @Size 1686 @Out KARAOKE.EXE
	@File SETM16.EXE @Out SETM16.EXE
	@File SETCFG.EXE @Out SETCFG.EXE
	@File SETBAT.EXE @Out SETBAT.EXE
	@File WSETUP.EXE @Out WSETUP.EXE
	@File MAD16C.DRV @Size 62272 @Out win\MAD16C.DRV
	@File VMAD16.386 @Size 21237 @Out win\VMAD16.386
	@File M16MIDI.DRV @Size 12720 @Out win\M16MIDI.DRV
	@File MSMIXMGR.DLL @Size 12688 @Out win\MSMIXMGR.DLL
	@File MIDIMAP.CFG @Size 19446 @Out win\MIDIMAP.CFG
	@If (@getWin == 1)
		@File MAD16C.DRV @Size 62272 @Out @windrive:\@windata\system\MAD16C.DRV
		@File VMAD16.386 @Size 21237 @Out @windrive:\@windata\system\VMAD16.386
		@File M16MIDI.DRV @Size 12720 @Out @windrive:\@windata\system\M16MIDI.DRV
		@File MSMIXMGR.DLL @Size 12688 @Out @windrive:\@windata\system\MSMIXMGR.DLL
		@File MIDIMAP.CFG @Size 19446 @Out @windrive:\@windata\system\MIDIMAP.MAD
	@EndIf
	@EndLib				  
	@File README.TXT @Out README.TXT
@EndDisk
@EndIf

//
// Decide if want to modify system files
//

@If (@getWin == 1)
    @INI = "YES"
@Else
    @INI = "NO"
@EndIf

DECIDESYSTEM:

@ClearOption(6)	 		
@ClearOption(66)		
@ClearOption(666)		
@ClearOption(6666)		

@GetOption
	@cls
	            ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
	            Ί    Options to Update System Files    Ί
	            ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ

    The Installation Program is now ready to modify your DOS/Windows System 
    files to make the installation complete.  If changes can be made NOW
    select YES for each file listed below (press [Enter] to change); else 
    select NO. If the Selection is 

    [YES], we will first BACKUP your original files before actually making 
           changes to them.  
    [NO],  we will not modify your original files but create the changes to 
           a BACKUP file instead.  
    [BACKUP] files will have the same prefix but ending with a .MAD extention. 
    This will allow you to restore or alter your system files at a later time.

	@LocalWindow(20,32)
	@Option 6  	= "CONFIG.SYS:                       @SYS"
	@Option 66 	= "AUTOEXEC.BAT:                     @BAT"
	@Option 666  	= "Windows Config File(SYSTEM.INI):  @INI"
	@Option 6666  	= "CONTINUE"
@EndOption

  	// Hardware Main Selection

		@If (6 [= @Option)
			@Goto SYSSEL
		@ElseIf (66 [= @Option)
			@Goto BATSEL
		@ElseIf (666 [= @Option)
			@Goto INISEL
		@ElseIf (6666 [= @Option)
			@Goto SETCONFIG
		@EndIf

SYSSEL:
	@If ("YES" == "@SYS")
	 @SYS = "NO"
	@Else
	 @SYS = "YES"
	@EndIf
	@Goto DECIDESYSTEM
BATSEL:
	@If ("YES" == "@BAT")
	 @BAT = "NO"
	@Else
	 @BAT = "YES"
	@EndIf
	@Goto DECIDESYSTEM
INISEL:
     @If (@getWin == 1)
	@If ("YES" == "@INI")
	 @INI = "NO"
	@Else
	 @INI = "YES"
	@EndIf
     @EndIf
	@Goto DECIDESYSTEM

//
// Update System Files
//

SETCONFIG:

@Display
@ChDrive @OutDrive
@ChDir "@Subdir"
@Cls
@EndDisplay

@Tmp = "@OutDrive:\\@Subdir\\CDSETUP.SYS @VS"

@If (1 == @CdDrv)
    @If ("YES" == "@SYS")
	@Display
	  //@Cls
	              ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
	              Ί     Updating CONFIG.SYS...      Ί
	              ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
	  @If (@System("setcfg @Tmp") == 1)
		 //An Error has occured while modifying your Config.sys file.
		 //The file may 
		 //		@Pause
	  @EndIf
        @EndDisplay
    @Else
	@Display
	  //@Cls
	              ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
	              Ί     Creating CONFIG.MAD...      Ί
	              ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
	  @If (@System("setcfg /n @Tmp") == 1)
		 //An Error has occured while modifying your Config.sys file.
		 //The file may 
		 //		@Pause
	  @EndIf
        @EndDisplay
    @EndIf
@EndIf

@ChDrive @OutDrive
@ChDir "@Subdir"
@Tmp = "@initName @EnvVar"	   // Init program & Environment Var

@If ("YES" == "@BAT")
    @Display
	//@Cls




	              ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
	              Ί    Updating AUTOEXEC.BAT...     Ί
	              ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
@If (@System("setbat @OutDrive:@Subdir @Tmp A@SBPort I@SBInt D@SBDma") == 1)
		 //An Error has occured while modifying your Autoexec.bat file.
		 //The file may 
		 //		@Pause
	@EndIf
    @EndDisplay
@Else
    @Display
	//@Cls




	              ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
	              Ί    Creating AUTOEXEC.MAD...     Ί
	              ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
@If (@System("setbat /n @OutDrive:@Subdir @Tmp A@SBPort I@SBInt D@SbDma") == 1)
		 //An Error has occured while modifying your Autoexec.bat file.
		 //The file may 
		 //		@Pause
	@EndIf
    @EndDisplay
@EndIf

@If (@getWin == 1)
  @Tmp = "@DrvName @VxDName @ExtMidi"
  @If ("YES" == "@INI")	    // 
    @Display
        //@ChDrive @OutDrive
        //@ChDir "@Subdir"
    	//@Cls







	              ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
	              Ί      Updating SYSTEM.INI        Ί
	              ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
	@If (@System("wsetup @WS @Tmp") == 1)
	   //         Update  System.Ini Failed !!
	   //			@Pause
	@EndIf
    @EndDisplay
  @Else	   // create backup only for reference
    @Display
        //@ChDrive @OutDrive
        //@ChDir "@Subdir"
    	//@Cls







	              ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
	              Ί      Creating SYSTEM.MAD        Ί
	              ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ
	@If (@System("wsetup /n @WS @Tmp") == 1)
	 //             Update System.Ini Failed !!
	 // 			@Pause
	@EndIf
    @EndDisplay
  @EndIf
@EndIf


// Modify MAD16.CFG file for MAD16 Hardware Settings

@Display
	              ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
	              Ί   Cleaning Up Temp. Files...    Ί
	              ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ

  //@ChDrive @OutDrive
  //@ChDir "@Subdir"

  // *** setup MAD16.CFG ***
  @System("setm16 @EnvVar @Hardware");

  // *** Delete our setup utilities ***
  @Delete("@OutDrive:\\@Subdir\\setcfg.exe")
  @Delete("@OutDrive:\\@Subdir\\setbat.exe")
  @Delete("@OutDrive:\\@Subdir\\wsetup.exe")
  @Delete("@OutDrive:\\@Subdir\\setm16.exe")
@EndDisplay


FINISH:

// Done. 

@Display
	@Cls

	    ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
	    Ί     OPTi MAD16 Software Installation Successful     Ί
	    ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ

	      Installation of @Name Software is now Finished.
	      You must reboot your computer (Press Ctrl-Alt-Del) 
	      to take effect to run DOS Sound Applications. 
	
	      MAD16 Audio Drivers for Windows are also installed 
	      and ready to play.

	      Thank you for using OPTi MAD16 Sound System.



					@Pause
@EndDisplay

// Check if Application exists

@Answer = "N"
@If (@getWin == 1)
@If (@Exists("@InDrive:\\setup.exe"))
  @Answer = "Y"
  @GetString  @Answer


	    ΙΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝ»
	    Ί          Install Windows Sound Application          Ί
	    ΘΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΝΌ

	   Windows Application [Multimedia Sound Studio] is shipped 
	   with this diskette. If you wish to install the application
	   now, the answer to the following question is "Y". After the
	   installation is complete, you must exit Windows and REBOOT
	   your computer if you wish to play games in DOS.

      @Prompt = "Do you want to install Sound Studio Now (Y/N) ? (Enter=Y) "
  @EndString
@EndIf
@EndIf


// Last Block, Install Application if there is One

@Finish

	@If ("Y" == "@Answer")
	 @Execute("win", "@InDrive:\\setup");
	@EndIf

@EndFinish

/* end-of-file */
//  @File 
