home *** CD-ROM | disk | FTP | other *** search
Wrap
'************************************************************************** '* Wired for Sound Install Script '* version 1.1 by Aaron Wallace (c) 1993 Aristosoft, Inc '************************************************************************** '' Define DEBUG for script debugging '$DEFINE DEBUG '$INCLUDE 'setupapi.inc' '$INCLUDE 'msdetect.inc' ''Dialog ID's CONST WELCOME = 100 CONST ASKQUIT = 200 CONST DESTPATH = 300 CONST EXITFAILURE = 400 CONST EXITQUIT = 600 CONST EXITSUCCESS = 700 CONST WHICHINST = 800 CONST APPHELP = 900 CONST WHICHINSTHLP = 910 CONST SETOWNER = 1000 CONST TESTSOUND = 1100 CONST INSTALLDRV = 1200 CONST SOUNDPLAYED = 1300 CONST WAITDLG = 1400 CONST EXITREBOOT = 1500 CONST BBD1 = 5000 CONST BBD2 = 5010 CONST BBD3 = 5020 CONST BBD4 = 5030 CONST BBD5 = 5040 CONST BBD6 = 5050 CONST SOUNDSDLG = 5200 CONST TAPPSDLG = 5300 CONST VOICESDLG = 5400 CONST CUSTINST = 6200 CONST TOOBIG = 6300 CONST BADPATH = 6400 '' For message boxes CONST MB_YESNO=4 CONST IDNO=7 CONST IDYES=6 ''Bitmap ID CONST LOGO = 1 ''File Types CONST BASEFILES = 1 CONST TAPPFILES = 2 CONST SOUNDFILES = 3 CONST VOICEFILES = 4 CONST MAX_TYPES = 4 ''Install directories, etc. GLOBAL DEST$ ''Default destination directory. GLOBAL WINDRIVE$ ''Windows drive letter. GLOBAL CUIDLL$ ''CUI DLL GLOBAL WINDIR$ ''Windows directory GLOBAL SYSDIR$ ''System directory GLOBAL WININI$ ''"win.ini" GLOBAL SYSINI$ ''GetWindowsDir() + "system.ini" '' User info GLOBAL OWNER$ '' Product registered owner GLOBAL WORKPLACE$ '' Company or such ''Install item lists GLOBAL BASE$ ''List of base files GLOBAL TAPPS$ ''List of all talking apps GLOBAL SOUNDS$ ''List of all sounds. GLOBAL VOICES$ ''List of available voices GLOBAL BASEINST$ ''List of base files to install GLOBAL TAPPSINST$ ''List of Talking Apps to install GLOBAL SOUNDSINST$ ''List of sounds to install GLOBAL VOICESINST$ ''List of voices to install ''Custom Install list symbol names GLOBAL BASENEEDS$ ''Option list costs per drive GLOBAL TAPPNEEDS$ GLOBAL SOUNDNEEDS$ GLOBAL VOICENEEDS$ GLOBAL EXTRACOSTS$ ''List of extra costs to add per drive ''Custom Install dialog list symbol names GLOBAL CHECKSTATES$ ''List of check box values GLOBAL STATUSTEXT$ ''List of values to initialize status items GLOBAL DRIVETEXT$ ''Drive space info, etc. '' Install DSOUND GLOBAL INSTDSOUND% '' Customize product GLOBAL CUSTOMIZE% '' Test sound hardware GLOBAL DOTEST% GLOBAL WFSFOUND% GLOBAL CUSTINSTALL% '' Which type of install to perform, by default GLOBAL DEFINSTOPT$ ''Progman titles GLOBAL WFSAPP$ ''Name of WFS app ''Win.ini [Aristosoft] install code GLOBAL INSTDIR$ ''Space requirements GLOBAL FITS% '' > 0 if everything fits DECLARE SUB RecalcOptFiles (ftype%) DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING DECLARE FUNCTION GetWindowsVersionCorrectly& () DECLARE FUNCTION MakeVer& (x as integer, y as integer) DECLARE FUNCTION StringInList (s$, y$) AS INTEGER DECLARE FUNCTION sndPlaySound LIB "MMSYSTEM.DLL" (f$, fl%) AS INTEGER DECLARE SUB RemoveSectionFiles (dest$, sect$) DECLARE SUB RemDirectory (d$) DECLARE FUNCTION HasSoundDriver() AS INTEGER DECLARE SUB SendProgmanCommand LIB "CUI.DLL" (s$) DECLARE SUB KillFiles LIB "CUI.DLL" (s$) DECLARE FUNCTION GetModuleHandle LIB "KERNEL" (f$) AS INTEGER DECLARE SUB Ctl3dRegister LIB "WFSUI.DLL" (f%) DECLARE SUB Ctl3dAutoSubclass LIB "WFSUI.DLL" (f%) DECLARE SUB Ctl3dUnregister LIB "WFSUI.DLL" (f%) '' These are defined in wfs.inc (product-specific) DECLARE SUB SetProductTitles DECLARE FUNCTION InfFile() AS STRING DECLARE FUNCTION MakeInstDir(D$) AS STRING DECLARE SUB AddInfSectionNames (BASE$, TAPPS$, SOUNDS$, VOICES$, BASEINST$, TAPPSINST$, SOUNDSINST$, VOICESINST$) DECLARE SUB RecalcPath DECLARE SUB AddOptFilesToCopyList (ftype%) DECLARE SUB SetDriveStatus DECLARE SUB AddOptFiles DECLARE SUB ConfigureApps DECLARE SUB AddBillboards DECLARE SUB DoUninstall '' This is where it all begins! INIT: CUIDLL$ = "cui.dll" DEFINSTOPT$ = "1" INSTDSOUND% = 0 CUSTOMIZE% = -1 DOTEST% = -1 SetProductTitles HELPPROC$ = "FHelpDlgProc" ''Help dialog procedure SetBitmap CUIDLL$, LOGO '' We don't do Windows 3.0... If GetWindowsVersionCorrectly() < MakeVer(3, 10) Then i% = DoMsgBox("This product requires Windows version 3.10 or greater", WFSAPP$, MB_OK) GOTO DONEFINIFIN End If '' We don't want these DLLs to be loaded quite yet... LookAround: IF GetModuleHandle("SNDAPI") OR GetModuleHandle("WFSABOUT") THEN i% = DoMsgBox("Please quit all other Aristosoft products before continuing with Setup.", WFSAPP$, MB_RETRYCANCEL) IF i% = IDRETRY THEN GOTO LookAround ELSEIF i% = IDCANCEL THEN GOTO DONEFINIFIN END IF END IF HCUI% = GetModuleHandle("CUI") Ctl3dRegister(HCUI%) Ctl3dAutoSubclass(HCUI%) ''Find location of INF file and create a default dest. dir szInf$ = GetSymbolValue("STF_SRCINFPATH") IF szInf$ = "" THEN szInf$ = GetSymbolValue("STF_CWDDIR") + InfFile() END IF '' Load the INF file ReadInfFile szInf$ '' Construct default strings WINDIR$ = GetWindowsDir() SYSDIR$ = GetWindowsSysDir() WININI$ = "win.ini" SYSINI$ = MakePath(WINDIR$, "system.ini") '' Construct the default install path WINDRIVE$ = MID$(WINDIR$, 1, 1) DEST$ = MakeInstDir(WINDRIVE$) '' Setup install symbols BASE$ = "Base Files" TAPPS$ = "Talking Apps" SOUNDS$ = "Sounds" VOICES$ = "Voices" BASEINST$ = "Base Files Inst" TAPPSINST$ = "Talking Apps Inst" SOUNDSINST$ = "Sounds Inst" VOICESINST$ = "Voices Inst" SetSymbolValue BASE$, "" SetSymbolValue TAPPS$, "" SetSymbolValue SOUNDS$, "" SetSymbolValue VOICES$, "" ''Set up symbols for the initial install dialog RADIODEFAULT$ = "Radio Default" ''Set up symbols for the custom install dialog CHECKSTATES$ = "CheckItemsState" STATUSTEXT$ = "StatusItemsText" DRIVETEXT$ = "DriveStatusText" FOR i% = 1 TO 4 STEP 1 AddListItem CHECKSTATES$, "ON" NEXT i% FOR i% = 1 TO 4 STEP 1 AddListItem STATUSTEXT$, "" NEXT i% FOR i% = 1 TO 7 STEP 1 AddListItem DRIVETEXT$, "" NEXT i% ReplaceListItem DRIVETEXT$, 7, DEST$ ''Disk cost list symbols BASENEEDS$ = "BaseNeeds" TAPPNEEDS$ = "TAppNeeds" SOUNDNEEDS$ = "SoundNeeds" VOICENEEDS$ = "VoiceNeeds" EXTRACOSTS$ = "ExtraCosts" FOR i% = 1 TO 26 STEP 1 AddListItem EXTRACOSTS$, "0" NEXT i% ''Configure lists of installable files AddInfSectionNames BASE$, TAPPS$, SOUNDS$, VOICES$, BASEINST$, TAPPSINST$, SOUNDSINST$, VOICESINST$ '$IFDEF DEBUG i% = SetSizeCheckMode(scmOnIgnore) '' could use scmOff; def = scmOnFatal '$ENDIF ''DEBUG '' Display Welcome dialog WELCOME: sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$) IF sz$ = "EXIT" THEN GOSUB ASKQUIT GOTO WELCOME ELSEIF sz$ = "CONTINUE" THEN UIPop 1 GOTO WHICHINST END IF GOTO WELCOME '' See if users want an easy install, custom install, or no install... WHICHINST: SetSymbolValue "RadioDefault", DEFINSTOPT$ sz$ = UIStartDlg(CUIDLL$, WHICHINST, "FRadioDlgProc", WHICHINSTHLP, HELPPROC$) ''sz$ is the button the user pressed; RADIODEFAULT$ is the option selected IF sz$ = "EXIT" THEN GOSUB ASKQUIT GOTO WHICHINST ELSEIF sz$ = "CONTINUE" THEN sz$ = GetSymbolValue("ButtonChecked") IF sz$ = "1" THEN UIPop 1 CUSTINSTALL% = 0 GOTO CUSTOMIZE ELSEIF sz$ = "2" THEN UIPop 1 CUSTINSTALL% = -1 GOTO CUSTOMIZE ELSEIF sz$ = "3" THEN DoUninstall GOTO WHICHINST END IF END IF GOTO WHICHINST '' Customize the copy of the product CUSTOMIZE: IF NOT CUSTOMIZE% THEN GOTO SOUNDTEST END IF sz$ = UIStartDlg(CUIDLL$, SETOWNER, "FNameOrgDlgProc", WHICHINSTHLP, HELPPROC$) IF sz$ = "EXIT" THEN GOSUB ASKQUIT GOTO CUSTOMIZE ELSEIF sz$ = "CONTINUE" THEN OWNER$ = GetSymbolValue("NameOut") WORKPLACE$ = GetSymbolValue("OrgOut") UIPop 1 GOTO SOUNDTEST ELSEIF sz$ = "BACK" THEN UIPop 1 GOTO WHICHINST END IF GOTO CUSTOMIZE '' Test the sound system SOUNDTEST: IF NOT DOTEST% THEN GOTO DOINST END IF sz$ = UIStartDlg(CUIDLL$, TESTSOUND, "FInfoDlgProc", WHICHINSTHLP, HELPPROC$) IF sz$ = "EXIT" THEN GOSUB ASKQUIT GOTO SOUNDTEST ELSEIF sz$ = "CONTINUE" THEN UIPop 1 IF HasSoundDriver() THEN GOTO DOINST ELSE GOTO INSTDSOUND END IF ELSEIF sz$ = "BACK" THEN UIPop 1 GOTO CUSTOMIZE ELSEIF sz$ = "TEST" THEN w$ = "TEST.WAV" res% = sndPlaySound(w$, 2) UIPop 1 GOTO DIDPLAY END IF GOTO SOUNDTEST '' Did the sound play? DIDPLAY: sz$ = UIStartDlg(CUIDLL$, SOUNDPLAYED, "FInfoDlgProc", WHICHINSTHLP, HELPPROC$) IF sz$ = "EXIT" THEN GOSUB ASKQUIT GOTO DIDPLAY ELSEIF sz$ = "YES" THEN UIPop 1 GOTO DOINST ELSEIF sz$ = "NO" THEN UIPop 1 GOTO INSTDSOUND ELSEIF sz$ = "BACK" THEN UIPop 1 GOTO SOUNDTEST END IF GOTO DIDPLAY '' Install DSOUND INSTDSOUND: sz$ = UIStartDlg(CUIDLL$, INSTALLDRV, "FInfoDlgProc", WHICHINSTHLP, HELPPROC$) IF sz$ = "EXIT" THEN GOSUB ASKQUIT GOTO INSTDSOUND ELSEIF sz$ = "INSTALL" THEN UIPop 1 INSTDSOUND% = -1 GOTO DOINST ELSEIF sz$ = "CONTINUE" THEN UIPop 1 GOTO DOINST ELSEIF sz$ = "BACK" THEN UIPop 1 GOTO DIDPLAY END IF GOTO INSTDSOUND '' Do the appropriate type of install DOINST: IF CUSTINSTALL% THEN GOTO CUSTINST END IF '' else fall-thru ''Perform a default installation (of all files and options) DEFINST: RecalcPath SetDriveStatus GETDEFINSTPATH: GOSUB GETPATH IF sz$ = "CONTINUE" THEN ''Install only if it will fit. IF FITS% > 0 THEN GOSUB TOOBIG GOTO GETDEFINSTPATH END IF UIPop 1 GOTO INSTALL ELSEIF sz$ = "BACK" THEN GOTO WHICHINST END IF GOTO GETDEFINSTPATH ''Perform a custom installation (let user choose files, etc) CUSTINST: RecalcPath SetDriveStatus CUSTINSTDLG: sz$ = UIStartDlg(CUIDLL$, CUSTINST, "FCustInstDlgProc", APPHELP, HELPPROC$) IF sz$ = "CONTINUE" THEN ''Install only if it will fit. IF FITS% > 0 THEN GOSUB TOOBIG GOTO CUSTINSTDLG END IF UIPop 1 GOTO INSTALL ELSEIF sz$ = "PATH" THEN GOSUB GETPATH GOTO CUSTINSTDLG ELSEIF sz$ = "CHK1" THEN RecalcOptFiles BASEFILES SetDriveStatus GOTO CUSTINSTDLG ELSEIF sz$ = "CHK2" THEN RecalcOptFiles TAPPFILES SetDriveStatus GOTO CUSTINSTDLG ELSEIF sz$ = "CHK3" THEN RecalcOptFiles SOUNDFILES SetDriveStatus GOTO CUSTINSTDLG ELSEIF sz$ = "CHK4" THEN RecalcOptFiles VOICEFILES SetDriveStatus GOTO CUSTINSTDLG ELSEIF sz$ = "BTN2" THEN GOTO TAPPFILES ELSEIF sz$ = "BTN3" THEN GOTO SOUNDFILES ELSEIF sz$ = "BTN4" THEN GOTO VOICEFILES ELSEIF sz$ = "EXIT" THEN GOSUB ASKQUIT GOTO CUSTINST END IF GOTO CUSTINSTDLG INSTALL: SetRestartDir DEST$ ClearCopyList AddOptFiles AddBillboards CreateDir DEST$, cmoNone UIPopAll ''Do the copyn' SetCopyGaugePosition 10, 135 CopyFilesInCopyList ''Back up SYSTEM.INI and WIN.INI CopyFile MakePath(WINDIR$, WININI$), MakePath(WINDIR$, "WIN.BAK"), cmoOverwrite, 0 CopyFile SYSINI$, MakePath(WINDIR$, "SYSTEM.BAK"), cmoOverwrite, 0 '' Configure the installed applications ConfigureApps ''See if we need to restart Windows to finish installing system files which may be in use IF RestartListEmpty() = 0 THEN i% = DoMsgBox("Certain system files that Setup needs to install are currently in use." + " Please close all other applications and press OK. Setup will exit Windows, install these files, and restart Windows.", WFSAPP$ + " Setup", MB_OK) i% = ExitExecRestart() END IF QUIT: ON ERROR GOTO ERRQUIT IF ERR = 0 THEN dlg% = EXITREBOOT ELSEIF ERR = STFQUIT THEN dlg% = EXITQUIT ELSE '$IFNDEF DEBUG RESUME NEXT '$ELSE dlg% = EXITFAILURE '$ENDIF END IF QUITL1: sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "") IF sz$ = "REACTIVATE" THEN GOTO QUITL1 END IF UIPop 1 DONEFINIFIN: Ctl3dUnregister(HCUI%) END ERRQUIT: i% = DoMsgBox("Setup sources were corrupted, call Aristosoft at (510) 426-5355!", "Setup Error", MB_OK+MB_TASKMODAL+MB_ICONHAND) Ctl3dUnregister(HCUI%) END GETPATH: SetSymbolValue "EditTextIn", DEST$ SetSymbolValue "EditFocus", "END" GETPATHL1: sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", APPHELP, HELPPROC$) IF sz$ = "CONTINUE" THEN olddest$ = DEST$ DEST$ = GetSymbolValue("EditTextOut") ''Validate new path. IF IsDirWritable(DEST$) = 0 THEN GOSUB BADPATH GOTO GETPATHL1 END IF UIPop 1 ''Truncate display if too long. IF LEN(DEST$) > 23 THEN ReplaceListItem DRIVETEXT$, 7, MID$(DEST$, 1, 23)+"..." ELSE ReplaceListItem DRIVETEXT$, 7, DEST$ END IF ''Recalc if path changed. ''IF (olddest$ <> DEST$) AND (olddest$ <> DEST$+"\") AND (olddest$+"\" <> DEST$) THEN RecalcPath SetDriveStatus ''END IF olddest$ = "" RETURN ELSEIF sz$ = "EXIT" THEN GOSUB ASKQUIT GOTO GETPATHL1 ELSEIF sz$ = "BACK" THEN UIPop 1 RETURN END IF GOTO GETPATHL1 TAPPFILES: SetSymbolValue "ListItemsIn", GetSymbolValue(TAPPS$) SetSymbolValue "ListItemsOut", GetSymbolValue(TAPPSINST$) TAPPF: sz$ = UIStartDlg(CUIDLL$, TAPPSDLG, "FMultiDlgProc", APPHELP, HELPPROC$) IF sz$ = "CONTINUE" THEN UIPop 1 SetSymbolValue TAPPSINST$, GetSymbolValue("ListItemsOut") RecalcOptFiles TAPPFILES SetDriveStatus GOTO CUSTINSTDLG ELSEIF sz$ = "EXIT" THEN GOSUB ASKQUIT GOTO TAPPF ELSE '' Back... UIPop 1 GOTO CUSTINSTDLG END IF GOTO TAPPF SOUNDFILES: SetSymbolValue "ListItemsIn", GetSymbolValue(SOUNDS$) SetSymbolValue "ListItemsOut", GetSymbolValue(SOUNDSINST$) SOUNDF: sz$ = UIStartDlg(CUIDLL$, SOUNDSDLG, "FMultiDlgProc", APPHELP, HELPPROC$) IF sz$ = "CONTINUE" THEN UIPop 1 SetSymbolValue SOUNDSINST$, GetSymbolValue("ListItemsOut") RecalcOptFiles SOUNDFILES SetDriveStatus GOTO CUSTINSTDLG ELSEIF sz$ = "EXIT" THEN GOSUB ASKQUIT GOTO SOUNDF ELSE '' Back... UIPop 1 GOTO CUSTINSTDLG END IF GOTO SOUNDF VOICEFILES: SetSymbolValue "ListItemsIn", GetSymbolValue(VOICES$) SetSymbolValue "ListItemsOut", GetSymbolValue(VOICESINST$) VOICEF: sz$ = UIStartDlg(CUIDLL$, VOICESDLG, "FMultiDlgProc", APPHELP, HELPPROC$) IF sz$ = "CONTINUE" THEN UIPop 1 SetSymbolValue VOICESINST$, GetSymbolValue("ListItemsOut") RecalcOptFiles VOICEFILES SetDriveStatus GOTO CUSTINSTDLG ELSEIF sz$ = "EXIT" THEN GOSUB ASKQUIT GOTO VOICEF ELSE '' Back... UIPop 1 GOTO CUSTINSTDLG END IF GOTO VOICEF TOOBIG: sz$ = UIStartDlg(CUIDLL$, TOOBIG, "FInfo0DlgProc", 0, "") UIPop 1 RETURN BADPATH: sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "") UIPop 1 RETURN ASKQUIT: sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "") IF sz$ = "EXIT" THEN UIPopAll ERROR STFQUIT ELSEIF sz$ = "REACTIVATE" THEN GOTO ASKQUIT ELSE UIPop 1 END IF RETURN ''Recalculate space based on install options... SUB RecalcOptFiles (ftype%) STATIC CursorSave% = ShowWaitCursor() sz$ = UIStartDlg(CUIDLL$, WAITDLG, "FModelessDlgProc", APPHELP, HELPPROC$) ClearCopyList AddOptFilesToCopyList ftype% fExtra% = 0 IF ftype% = BASEFILES THEN ListSym$ = BASENEEDS$ IF GetListItem(CHECKSTATES$, BASEFILES) = "ON" THEN ''Add extra cost to Windows drive for ini/progman, etc. ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1 ReplaceListItem EXTRACOSTS$, ndrive%, "10240" fExtra% = 1 END IF ELSEIF ftype% = TAPPFILES THEN ListSym$ = TAPPNEEDS$ ELSEIF ftype% = SOUNDFILES THEN ListSym$ = SOUNDNEEDS$ ELSEIF ftype% = VOICEFILES THEN ListSym$ = VOICENEEDS$ END IF StillNeed& = GetCopyListCost(EXTRACOSTS$, ListSym$, "") cost& = 0 FOR i% = 1 TO 26 STEP 1 cost& = cost& + VAL(GetListItem(ListSym$, i%)) NEXT i% ReplaceListItem STATUSTEXT$, ftype%, STR$(cost& / 1024) + " K" IF fExtra% THEN ReplaceListItem EXTRACOSTS$, ndrive%, "0" END IF UIPop 1 RestoreCursor CursorSave% ListSym$ = "" END SUB ''Make path from dir and szFile; add \ as needed FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING IF szDir$ = "" THEN MakePath = szFile$ ELSEIF szFile$ = "" THEN MakePath = szDir$ ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN MakePath = szDir$ + szFile$ ELSE MakePath = szDir$ + "\" + szFile$ END IF END FUNCTION '' Return true if the given string is in the symbol's list FUNCTION StringInList (s$, y$) STATIC AS INTEGER l% = GetListLength(y$) FOR i% = 1 TO l IF s$ = GetListItem(y$, i%) THEN StringInList = -1 GOTO DONE END IF NEXT i% StringInList = 0 DONE: END FUNCTION ''Get Windows version in a useful way FUNCTION GetWindowsVersionCorrectly& () STATIC GetWindowsVersionCorrectly = GetWindowsMajorVersion() * 256 + GetWindowsMinorVersion() END FUNCTION '' Turn x, y into a major.minor version long FUNCTION MakeVer& (x as integer, y as integer) STATIC MakeVer = x * 256 + y END FUNCTION '' Remove all files in the given .INF section SUB RemoveSectionFiles (dest$, sect$) STATIC foo$ = "foo" MakeListFromSectionFilename foo$, sect$ l% = GetListLength(foo$) FOR i% = 1 TO l% STEP 1 RemoveFile MakePath(dest$, GetListItem(foo$, i%)), cmoForce NEXT i% foo$ = "" END SUB '' Remove directory and all files in it, if it exists SUB RemDirectory(d$) STATIC IF Exists(MakePath(d$, "NUL")) THEN Kill MakePath(d$, "*.*") RmDir d$ END IF END SUB '' Return True (-1) if the user has a sound driver in the [drivers] '' section of win.ini. FUNCTION HasSoundDriver() STATIC AS INTEGER r% = 0 IF GetIniKeyString(SYSINI$, "drivers", "wave") <> "" THEN r% = -1 ELSEIF GetIniKeyString(SYSINI$, "drivers", "wave1") <> "" THEN r% = -1 ELSEIF GetIniKeyString(SYSINI$, "drivers", "wave2") <> "" THEN r% = -1 ELSEIF GetIniKeyString(SYSINI$, "drivers", "wave3") <> "" THEN r% = -1 ELSEIF GetIniKeyString(SYSINI$, "drivers", "wave4") <> "" THEN r% = -1 ELSEIF GetIniKeyString(SYSINI$, "drivers", "wave5") <> "" THEN r% = -1 END IF HasSoundDriver = r% END FUNCTION '' Include product-specific function definitions '$INCLUDE 'specific.inc'