home *** CD-ROM | disk | FTP | other *** search
/ Sound Explorer Plus / SOUNDEXP.BIN / audiosim / setup2.mst < prev    next >
Text File  |  1993-10-25  |  50KB  |  1,388 lines

  1.  
  2. ''////////////////////////////////////// include files
  3.  
  4. '$INCLUDE 'setupapi.inc'
  5. '$INCLUDE 'msdetect.inc'
  6.  
  7. ''////////////////////////////////////// WINAPI declarations
  8.  
  9. Declare Function ExitWindows% Lib "User" (dwReserved&, wReturnCode%)
  10. Declare Function WinHelp Lib "User" (hWnd%, lpHelpFile$, wCommand%, dwData) As Integer
  11. DECLARE FUNCTION ShowWindow  LIB "user.exe" (hWnd%,iShow%) AS INTEGER
  12. DECLARE FUNCTION SetWindowLong LIB "user.exe" (hWnd%, offset%, style&) AS LONG
  13. DECLARE FUNCTION WinExec LIB "Kernel" (lpCmdLine$, nCmdShow%) AS INTEGER
  14. Declare Function MessageBox Lib "User" (hWnd%, lpText$, lpCaption$,wType%) As Integer
  15. Declare Function GetFreeSpace Lib "Kernel" (wFlags%) As Long
  16. Declare Function GetTempFileName Lib "Kernel" (cDriveLetter%, lpPrefixString$, wUnique%, lpTempFileName$) As Integer
  17. Declare Function FindWindow Lib "User" (lpClassName$, lpWindowNam$) As Integer
  18.  
  19. ''////////////////////////////////////// WINAPI constants
  20.  
  21. Const WS_VISIBLE = &H10000000
  22. Const WS_CLIPCHILDREN = &H2000000
  23. Const WS_BORDER = &H800000
  24. Const SW_SHOWMAXIMIZED = 3
  25. CONST GWL_STYLE =-16
  26. Const MB_ICONQUESTION = &H20
  27. Const MB_ICONEXCLAMATION = &H30
  28. Const MB_ICONASTERISK = &H40
  29. Const MB_ICONINFORMATION = MB_ICONASTERISK
  30. Const MB_OKCANCEL = &H1
  31. Const MB_ABORTRETRYIGNORE = &H2
  32. Const MB_YESNOCANCEL = &H3
  33. Const MB_YESNO = &H4
  34. Const MB_RETRYCANCEL = &H5
  35. Const IDOK = 1
  36. Const IDYES = 6
  37. Const IDNO = 7
  38. Const HELP_CONTEXT = &H1
  39. Const HELP_QUIT = &H2
  40.  
  41. ''////////////////////////////////// check if Sound Impression is currently running
  42.  
  43. findclass1$ = "EDITPARENT"
  44. findclass2$ = "AUDRKPARENT"
  45. findtitle$ = "Sound Impression"
  46. lookforsi1% = FindWindow (findclass1$,findtitle$)
  47. lookforsimin% = FindWindow (findclass2$,NULL)
  48.     If lookforsi1% <> 0 or lookforsimin% <> 0 then
  49.         runningstop% = MessageBox(hwnd%, "Sound Impression is running.  Close it, then run Setup again.","Sound Impression Setup", MB_OK+MB_TASKMODAL+MB_ICONSTOP)
  50.         if IDOK then
  51.             STOP
  52.         end if
  53.     end if
  54.  
  55. ''////////////////////////////////// script subroutines
  56.  
  57. DECLARE SUB Install
  58. DECLARE SUB REMOVESI
  59. DECLARE SUB FINIS
  60. ON END FINIS
  61.  
  62. ''///////////////////////////////// script function declarations
  63.  
  64. DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
  65.  
  66. ''//////////////////////////////////////////CUI Dialog IDs
  67.  
  68. CONST CPMESSAGE      = 9999
  69. CONST CPANNOUNCE     = 5005
  70. CONST DRVCHOICE      = 5099
  71. CONST PICKTASKX      = 6000
  72. CONST STATUSREPORTX  = 6010
  73. CONST DESTPATHX      = 6020
  74. CONST SIPATHX        = 6025
  75. CONST CARDLISTX      = 6030
  76. CONST CARDLISTXLNG   = 6040
  77. CONST BADPATHX       = 6050
  78. CONST ASKQUITX       = 6060
  79. CONST EXITFAILUREX   = 6070
  80. CONST EXITQUITX      = 6080
  81. CONST EXITSUCCESSX   = 6090
  82. CONST APPHELPX       = 7000
  83. CONST CPANNOUNCEX    = 7007
  84. CONST DRVCHOICEX     = 7099
  85. CONST PICKTASK       = 8000
  86. CONST STATUSREPORT   = 8010
  87. CONST DESTPATH       = 8020
  88. CONST SIPATH         = 8025
  89. CONST CARDLIST       = 8030
  90. CONST CARDLISTLNG    = 8040
  91. CONST BADPATH        = 8050
  92. CONST ASKQUIT        = 8060
  93. CONST EXITFAILURE    = 8070
  94. CONST EXITQUIT       = 8080
  95. CONST EXITSUCCESS    = 8090
  96. CONST APPHELP        = 9000
  97.  
  98. ''///////////////////////////////// script globals
  99.  
  100. GLOBAL CHECKAGAIN%
  101. GLOBAL DEST$
  102. GLOBAL CARD$
  103. GLOBAL CARDLOADLIST$
  104. GLOBAL CARDPICK$
  105. GLOBAL SELECTED$
  106. GLOBAL szInf$
  107. GLOBAL progshell$
  108. GLOBAL STATS$
  109. GLOBAL STATUSITEMS$
  110. GLOBAL STATUSITEMSPICK$
  111. GLOBAL STATPICK$
  112. GLOBAL WINDIRECT$
  113. GLOBAL winsysdir$
  114. GLOBAL winsysini$
  115. GLOBAL INI$
  116. GLOBAL OPTCUR$
  117. GLOBAL PATHNOW$
  118. GLOBAL REMIMPRESSION$
  119. GLOBAL SCRWID%
  120. GLOBAL DELETEFLAG$
  121. GLOBAL SETUPOK$
  122. GLOBAL WORKSTRING$
  123. GLOBAL VIRTSTRING$
  124. GLOBAL PERMSWAP$
  125. GLOBAL TEMPSWAP$
  126. GLOBAL MCIDRIVERS$
  127. GLOBAL CARDDRIVERS$
  128. GLOBAL findarial$
  129. GLOBAL totop$
  130. GLOBAL WAVEOFF$
  131. GLOBAL MIDIOFF$
  132. GLOBAL CDOFF$
  133. GLOBAL CDD$
  134. GLOBAL CDDRIVER$
  135. GLOBAL MCISECT$
  136. GLOBAL MCICD$
  137. GLOBAL MCISEQ$
  138. GLOBAL SEQ$
  139. GLOBAL DRIVETIMER$
  140. GLOBAL TIM$
  141. GLOBAL WAVEDRV$
  142. GLOBAL WAVEDRV1$
  143. GLOBAL WAVEDRV2$
  144. GLOBAL WAVEDRV3$
  145. GLOBAL WAVEDRV4$
  146. GLOBAL WAVEDRV5$
  147. GLOBAL WAVEDRV6$
  148. GLOBAL WAVEDRV7$
  149. GLOBAL WAVEDRV8$
  150. GLOBAL WAVEDRV9$
  151. GLOBAL WAV$
  152. GLOBAL MIDIDRV$
  153. GLOBAL MIDIDRV1$
  154. GLOBAL MIDIDRV2$
  155. GLOBAL MIDIDRV3$
  156. GLOBAL MIDIDRV4$
  157. GLOBAL MIDIDRV5$
  158. GLOBAL MIDIDRV6$
  159. GLOBAL MIDIDRV7$
  160. GLOBAL MIDIDRV8$
  161. GLOBAL MIDIDRV9$
  162. GLOBAL NOPERMSWAP$
  163. GLOBAL TRUTYPKEY$
  164. GLOBAL ARIALKEY$
  165.  
  166. ''**
  167. ''**    Added for SoundExplorer setup
  168. ''**
  169. GLOBAL SoundExplorerValidDrive%
  170. ''*
  171. ''*
  172.  
  173.  
  174. ''////////////////////////////////////// Start
  175. INIT:
  176. ''////////////////////////////////////// read info file, do backdrop, set main variables
  177.  
  178. HELPPROC$ = "FHelpDlgProc"
  179. WINDIRECT$ = GetWindowsDir()
  180. winsysdir$ = GetWindowsSysDir()
  181. winsysini$ = FindFileInTree("SYSTEM.INI",WINDIRECT$)
  182.  
  183. CUIDLL$ = "cui_oem.dll"                                   ''<<<<<<<<<<<< contains oem-specific logo
  184.  
  185. CONST LOGO1 = 1
  186. CONST LOGO2 = 2
  187.  
  188. ''**
  189. ''**    Added for Sound Explorer setup
  190. SoundExplorerValidDrive% = 1
  191. ''**
  192. ''**
  193.  
  194.  
  195. mainWnd%=HwndFrame()
  196. w&=SetWindowLong(mainWnd%,GWL_STYLE,WS_VISIBLE+WS_BORDER+WS_CLIPCHILDREN)
  197. j%=ShowWindow(mainWnd%,SW_SHOWMAXIMIZED)
  198.  
  199. SCRWID% = GetScreenWidth()
  200.     If SCRWID% = 640 then
  201.     SetBitmap CUIDLL$, LOGO1
  202.     else
  203.     SetBitmap CUIDLL$, LOGO2
  204.     end if
  205. szInf$ = GetSymbolValue("STF_SRCINFPATH")
  206. IF szInf$ = "" THEN
  207.    szInf$ = GetSymbolValue("STF_CWDDIR") + "SETUP2.INF" ''<<<<<<<<<<<< info file name (can change)
  208. END IF
  209. ReadInfFile szInf$
  210.  
  211. ''/////////////////////// establish Setup Help window position in win.ini
  212.  
  213. helporig7$ = GetIniKeyString("win.ini","Windows Help","M_WindowPosition")
  214.  
  215. If SCRWID% = 640 then
  216.     CreateIniKeyValue "win.ini", "Windows Help", "M_WindowPosition", "[33,262,584,211,0]" , cmoOverwrite
  217. else
  218.     CreateIniKeyValue "win.ini", "Windows Help", "M_WindowPosition", "[100,358,584,211,0]" , cmoOverwrite
  219. end if
  220.  
  221. ''/////////////////////// set more local variables, do system analysis
  222.  
  223. findarial$ = FindFileInTree("ARIAL.FOT",WINDIRECT$)
  224. progini$ = FindFileInTree("PROGMAN.INI",WINDIRECT$)
  225. progshell$ = GetIniKeyString(winsysini$,"boot","shell")
  226.  
  227. MCISECT$ = lcase$("mci")
  228. MCICD$ = lcase$(rtrim$(ltrim$("cdaudio")))
  229. MCISEQ$ = lcase$(rtrim$(ltrim$("sequencer")))
  230. DRVSECT$ = lcase$("drivers")
  231. DRIVETIMER$ = lcase$(rtrim$(ltrim$("timer")))
  232.  
  233. MIDIDRV$ = lcase$(rtrim$(ltrim$("midi")))
  234. MIDIDRV1$ = lcase$(rtrim$(ltrim$("midi1")))
  235. MIDIDRV2$ = lcase$(rtrim$(ltrim$("midi2")))
  236. MIDIDRV3$ = lcase$(rtrim$(ltrim$("midi3")))
  237. MIDIDRV4$ = lcase$(rtrim$(ltrim$("midi4")))
  238. MIDIDRV5$ = lcase$(rtrim$(ltrim$("midi5")))
  239. MIDIDRV6$ = lcase$(rtrim$(ltrim$("midi6")))
  240. MIDIDRV7$ = lcase$(rtrim$(ltrim$("midi7")))
  241. MIDIDRV8$ = lcase$(rtrim$(ltrim$("midi8")))
  242. MIDIDRV9$ = lcase$(rtrim$(ltrim$("midi9")))
  243.  
  244. m0% = DoesIniKeyExist(winsysini$,DRVSECT$,MIDIDRV$)
  245. m1% = DoesIniKeyExist(winsysini$,DRVSECT$,MIDIDRV1$)
  246. m2% = DoesIniKeyExist(winsysini$,DRVSECT$,MIDIDRV2$)
  247. m3% = DoesIniKeyExist(winsysini$,DRVSECT$,MIDIDRV3$)
  248. m4% = DoesIniKeyExist(winsysini$,DRVSECT$,MIDIDRV4$)
  249. m5% = DoesIniKeyExist(winsysini$,DRVSECT$,MIDIDRV5$)
  250. m6% = DoesIniKeyExist(winsysini$,DRVSECT$,MIDIDRV6$)
  251. m7% = DoesIniKeyExist(winsysini$,DRVSECT$,MIDIDRV7$)
  252. m8% = DoesIniKeyExist(winsysini$,DRVSECT$,MIDIDRV8$)
  253. m9% = DoesIniKeyExist(winsysini$,DRVSECT$,MIDIDRV9$)
  254.  
  255. If m0% <> 0 then
  256. goto nextset
  257. elseif m1% <> 0 then
  258. goto nextset
  259. elseif m2% <> 0 then
  260. goto nextset
  261. elseif m3% <> 0 then
  262. goto nextset
  263. elseif m4% <> 0 then
  264. goto nextset
  265. elseif m5% <> 0 then
  266. goto nextset
  267. elseif m6% <> 0 then
  268. goto nextset
  269. elseif m7% <> 0 then
  270. goto nextset
  271. elseif m8% <> 0 then
  272. goto nextset
  273. elseif m9% <> 0 then
  274. goto nextset
  275. else
  276. SEQ$ = "no"
  277. end if
  278.  
  279. nextset:
  280.  
  281. WAVEDRV$ = lcase$(rtrim$(ltrim$("wave")))
  282. WAVEDRV1$ = lcase$(rtrim$(ltrim$("wave1")))
  283. WAVEDRV2$ = lcase$(rtrim$(ltrim$("wave2")))
  284. WAVEDRV3$ = lcase$(rtrim$(ltrim$("wave3")))
  285. WAVEDRV4$ = lcase$(rtrim$(ltrim$("wave4")))
  286. WAVEDRV5$ = lcase$(rtrim$(ltrim$("wave5")))
  287. WAVEDRV6$ = lcase$(rtrim$(ltrim$("wave6")))
  288. WAVEDRV7$ = lcase$(rtrim$(ltrim$("wave7")))
  289. WAVEDRV8$ = lcase$(rtrim$(ltrim$("wave8")))
  290. WAVEDRV9$ = lcase$(rtrim$(ltrim$("wave9")))
  291.  
  292. w0% = DoesIniKeyExist(winsysini$,DRVSECT$,WAVEDRV$)
  293. w1% = DoesIniKeyExist(winsysini$,DRVSECT$,WAVEDRV1$)
  294. w2% = DoesIniKeyExist(winsysini$,DRVSECT$,WAVEDRV2$)
  295. w3% = DoesIniKeyExist(winsysini$,DRVSECT$,WAVEDRV3$)
  296. w4% = DoesIniKeyExist(winsysini$,DRVSECT$,WAVEDRV4$)
  297. w5% = DoesIniKeyExist(winsysini$,DRVSECT$,WAVEDRV5$)
  298. w6% = DoesIniKeyExist(winsysini$,DRVSECT$,WAVEDRV6$)
  299. w7% = DoesIniKeyExist(winsysini$,DRVSECT$,WAVEDRV7$)
  300. w8% = DoesIniKeyExist(winsysini$,DRVSECT$,WAVEDRV8$)
  301. w9% = DoesIniKeyExist(winsysini$,DRVSECT$,WAVEDRV9$)
  302.  
  303. If w0% <> 0 then
  304. goto nextset2
  305. elseif w1% <> 0 then
  306. goto nextset2
  307. elseif w2% <> 0 then
  308. goto nextset2
  309. elseif w3% <> 0 then
  310. goto nextset2
  311. elseif w4% <> 0 then
  312. goto nextset2
  313. elseif w5% <> 0 then
  314. goto nextset2
  315. elseif w6% <> 0 then
  316. goto nextset2
  317. elseif w7% <> 0 then
  318. goto nextset2
  319. elseif w8% <> 0 then
  320. goto nextset2
  321. elseif w9% <> 0 then
  322. goto nextset2
  323. else
  324. WAV$ = "no"
  325. end if
  326.  
  327. nextset2:
  328.  
  329. timesys% = DoesIniKeyExist(winsysini$,DRVSECT$,DRIVETIMER$)
  330. if timesys% = 0 then
  331. TIM$ = "no"
  332. end if
  333.  
  334. cdsys% = DoesIniKeyExist(winsysini$,MCISECT$,MCICD$)
  335. if cdsys% = 0 then
  336. CDD$ = "no"
  337. end if
  338.  
  339. seqsys% = DoesIniKeyExist(winsysini$,MCISECT$,MCISEQ$)
  340. if seqsys% = 0 then
  341. SEQ$ = "no"
  342. end if
  343.  
  344. szTemp$ = String$(144, 0)
  345. tempresult% = GetTempFileName(0, "tst", 0, szTemp$)
  346. workdir$ = Mid$(szTemp$,1,1)
  347. RemoveFile szTemp$,cmoForce
  348. wfree& = GetFreeSpaceForDrive(workdir$)
  349. wfreesz$ = str$(wfree&/10000)
  350. wfreedec$ = mid$(wfreesz$,len(wfreesz$)-1,2)
  351. wfreepredec$ = mid$(wfreesz$,1,len(wfreesz$)-2)
  352. If val(wfreepredec$) < 16 then
  353. WORKSTRING$ = "**** Free space on Windows drive " + "(" + workdir$ + "): " + wfreepredec$ + "." + wfreedec$ + " MB"
  354. else
  355. WORKSTRING$ = "OK. Free space on Windows drive " + "(" + workdir$ + "): " + wfreepredec$ + "." + wfreedec$ + " MB"
  356. end if
  357.  
  358. vmem& = GetFreeSpace(0)
  359. vmemsz$ = str$(vmem&/10000)
  360. vmemdec$ = mid$(vmemsz$,len(vmemsz$)-1,2)
  361. vmempredec$ = mid$(vmemsz$,1,len(vmemsz$)-2)
  362. If val(vmempredec$) < 16 then
  363. VIRTSTRING$ = "**** Virtual memory (current): " + vmempredec$ + "." + vmemdec$ + " MB"
  364. else
  365. VIRTSTRING$ = "OK. Virtual memory (current): " + vmempredec$ + "." + vmemdec$ + " MB"
  366. end if
  367.  
  368. wpermswapd$=GetIniKeyString(winsysini$,"386Enh","PermSwapDOSDrive")
  369. wtempswapd$=GetIniKeyString(winsysini$,"386Enh","PagingFile")
  370. wpermswap$=GetIniKeyString(winsysini$,"386Enh","PermSwapSizeK")
  371. wtempswap$=GetIniKeyString(winsysini$,"386Enh","MaxPagingFileSize")
  372.  
  373. If len(wpermswap$) > 3 then
  374. wpermswapsz$ = mid$(wpermswap$,1,len(rtrim$(ltrim$(wpermswap$)))-1)
  375. wpermswapkb$ = mid$(wpermswapsz$,len(wpermswapsz$)-2,2)
  376. wpermswapmb$ = mid$(wpermswapsz$,1,len(wpermswapsz$)-2)
  377. if val(wpermswapmb$) < 16 then
  378. PERMSWAP$ = "**** Permanent Swap File (drive " + wpermswapd$ + "): " + wpermswapmb$ + "." + wpermswapkb$ + " MB"
  379. else
  380. PERMSWAP$ = "OK. Permanent Swap File (drive " + wpermswapd$ + "): " + wpermswapmb$ + "." + wpermswapkb$ + " MB"
  381. end if
  382. end if
  383.  
  384. if wpermswapd$ = "" then
  385. NOPERMSWAP$ = "**** Permanent Swap File not found"
  386. end if
  387.  
  388. If len(wtempswap$) > 3 then
  389. wtempswapsz$ = mid$(wtempswap$,1,len(rtrim$(ltrim$(wtempswap$)))-1)
  390. wtempswapkb$ = mid$(wtempswapsz$,len(wtempswapsz$)-2,2)
  391. wtempswapmb$ = mid$(wtempswapsz$,1,len(wtempswapsz$)-2)
  392. TEMPSWAP$ = "**** Temp Swap File (" + wtempswapd$ + "): " + wtempswapmb$ + "." + wtempswapkb$ + " MB"
  393. end if
  394.  
  395. wbitcheck$=GetIniKeyString(winsysini$,"386Enh","32BitDiskAccess")
  396. If lcase$(ltrim$(rtrim$(wbitcheck$))) <> "on" then
  397. WBITRPT$ = "**** 32-bit Disk Access is OFF"
  398. else
  399. WBITRPT$ = ""
  400. end if
  401.  
  402. dosver1% = GetDosMajorVersion()
  403. dosver2% = GetDosMinorVersion()
  404. dosresult1$ = ltrim$(rtrim$(str$(dosver1%)))
  405. dosresult2$ = ltrim$(rtrim$(str$(dosver2%)))
  406. dosresult$ = dosresult1$ + "." + dosresult2$
  407. If val(dosresult1$) < 5 then
  408. DOSVERRPT$ =  "*** DOS version: " + dosresult$
  409. else
  410. DOSVERRPT$ =  ""
  411. end if
  412.  
  413. winver1% = GetWindowsMajorVersion()
  414. winver2% = GetWindowsMinorVersion()
  415. winresult1$ = ltrim$(rtrim$(str$(winver1%)))
  416. winresult2$ = ltrim$(rtrim$(str$(winver2%)))
  417. winresult$ = winresult1$ + "." + winresult2$
  418. If val(winresult1$) < 3 and val(winresult2$) < 10 then
  419. WINVERRPT$ =  "**** Windows version: " + winresult$
  420. else
  421. WINVERRPT$ =  ""
  422. end if
  423.  
  424. mouse1% = HasMouseInstalled()
  425. If mouse1% <> 1 then
  426. MOUSERPT$ = "**** Mouse is NOT installed"
  427. else
  428. MOUSERPT$ = ""
  429. end if
  430.  
  431. wmode% = GetWindowsMode()
  432. If wmode% = 2 then
  433. WMODERPT$ = ""
  434. elseif wmode% = 1 then
  435. WMODERPT$ = "**** Windows mode: standard"
  436. elseif wmode% = 0 then
  437. WMODERPT$ = "**** Windows mode: Real"
  438. end if
  439.  
  440. wproctype% = GetProcessorType()
  441. If wproctype% = 4 then
  442. wproctyprpt$ = "OK. Processor type: 80486"
  443. elseif wproctype% = 3 then
  444. wproctyprpt$ = "**** Processor type: 80386"
  445. elseif wproctype% = 2 then
  446. wproctyprpt$ = "**** Processor type: 80286"
  447. elseif wproctype% = 1 then
  448. wproctyprpt$ = "**** Processor type: 80186"
  449. elseif wproctype% = 0 then
  450. wproctyprpt$ = "**** Processor type: 8086"
  451. else
  452. wproctyprpt$ = "**** Processor type: Undetermined"
  453. end if
  454.  
  455. wttfkeycheck% = DoesIniSectionExist("win.ini","TrueType")
  456. If wttfkeycheck% = 0 then
  457. TRUTYPKEY$ = "**** TrueType enabling switch not present"
  458. else
  459. TRUTYPKEY$ = ""
  460. end if
  461.  
  462. if wttfkeycheck% <> 0 then
  463. wttfcheck$=GetIniKeyString("win.ini","TrueType","TTEnable")
  464. If ltrim$(rtrim$(wttfcheck$)) <> "1" then
  465. TRUTYPRPT$ = "**** TrueType is not enabled"
  466. else
  467. TRUTYPRPT$ = ""
  468. end if
  469. end if
  470.  
  471. If findarial$ = "" then
  472. ARIALRPT$ = "**** Arial TrueType font not found"
  473. else
  474. ARIALRPT$ = ""
  475. end if
  476.  
  477. If findarial$ <> "" then
  478. arialkey1% = DoesIniKeyExist("win.ini","fonts","Arial (TrueType)")
  479. arialkey2% = DoesIniKeyExist("win.ini","fonts","Arial(TrueType)")
  480. arialkey3% = DoesIniKeyExist("win.ini","fonts","Arial")
  481. if arialkey1% = 0 and arialkey2% = 0 and arialkey3% = 0 then
  482. ARIALKEY$ = "**** Arial is not on your fonts list"
  483. else
  484. ARIALKEY$ = ""
  485. end if
  486. end if
  487.  
  488. ''/////////////////////////////////////////// opening dialog (3 radio buttons)
  489.  
  490. GETPURPOSE:
  491.     SetSymbolValue "RadioDefault", OPTCUR$
  492. OPTL1:
  493. if scrwid% = 640 then
  494.     sz$ = UIStartDlg(CUIDLL$, PICKTASKX, "FRadioDlgProc", 0, "")
  495. else
  496.     sz$ = UIStartDlg(CUIDLL$, PICKTASK, "FRadioDlgProc", 0, "")
  497. end if
  498.     OPTCUR$ = GetSymbolValue("ButtonChecked")
  499.  
  500.     IF sz$ = "CONTINUE" THEN
  501.         UIPop 1
  502.     ELSEIF sz$ = "REACTIVATE" THEN
  503.         GOTO OPTL1
  504.     ELSE
  505.         GOSUB ASKQUIT
  506.         GOTO GETPURPOSE
  507.     END IF
  508.  
  509. If OPTCUR$ = "2" then
  510.         PATHNOW$ = GetIniKeyString(MakePath(WINDIRECT$ , "audio.ini"),"SetupInfo","SetupPath")
  511.         GOTO CURPATH
  512. end if
  513. If OPTCUR$ = "3" then
  514.         PATHNOW$ = GetIniKeyString(MakePath(WINDIRECT$ , "audio.ini"),"SetupInfo","SetupPath")
  515.         REMIMPRESSION = "yes"
  516.         GOTO CURPATH
  517. end if
  518.  
  519. ''///////////////////////////// show destination path dialog (if installing)
  520.  
  521. ''**
  522. ''**    Added for dual SoundExplorer setup.  Replaces old "IF OPTCUR$ = "1"...END IF"
  523. ''**
  524. IF OPTCUR$ = "1" then
  525.     DEST$ = GetIniKeyString(MakePath(WINDIRECT$, "midisoft.ini"), "SetupInfo", "EXP_SetupPath")
  526.     DEST$ = MakePath(DEST$, "AUDIOSIM")
  527. end if
  528.  
  529. checkdltr$ = mid$(DEST$,1,1)
  530. IF checkdltr$ <> "" THEN
  531. checkexist% = IsDriveValid(checkdltr$)
  532.     IF checkexist% = 0 THEN
  533.         'GOSUB BADPATH
  534.         SoundExplorerValidDrive% = 0
  535.         GOTO GETPATHL2
  536.     END IF
  537. END IF
  538.  
  539. IF IsDirWritable(DEST$) = 0 THEN
  540.     'GOSUB BADPATH
  541.     SoundExplorerValidDrive% = 0
  542.     GOTO GETPATHL2
  543. END IF
  544.  
  545. 'End add for Soundexp
  546.  
  547. ''**
  548. ''**    Added for dual SoundExplorer setup - do not give user the choice for destination
  549. ''**
  550.  
  551. ''**
  552. ''**    Added for dual SoundExplorer setup - if destination from Sound Explorer fails, default
  553. ''**    to C:\AUDIOSIM
  554. ''**
  555. GETPATHL2:
  556. IF SoundExplorerValidDrive% = 0 THEN
  557. GETPATH:
  558. UIPop 1
  559.     SetSymbolValue "EditTextIn", DEST$
  560.     SetSymbolValue "EditFocus", "END"
  561. GETPATHL1:
  562. If SCRWID% = 640 then
  563.     sz$ = UIStartDlg(CUIDLL$, DESTPATHX, "FEditDlgProc", 0, "")
  564. else
  565.     sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", 0, "")
  566. end if
  567.     DEST$ = GetSymbolValue("EditTextOut")
  568.  
  569.     IF sz$ = "CONTINUE" THEN
  570.         checkdltr$ = mid$(DEST$,1,1)
  571.         If checkdltr$ <> "" then
  572.         checkexist% = IsDriveValid(checkdltr$)
  573.             If checkexist% = 0 then
  574.             GOSUB BADPATH
  575.             GOTO GETPATHL1
  576.             end if
  577.         end if
  578.                 IF IsDirWritable(DEST$) = 0 THEN
  579.                 GOSUB BADPATH
  580.                 GOTO GETPATHL1
  581.                 END IF
  582.         checkdspc& = GetFreeSpaceForDrive(checkdltr$)
  583.               if checkdspc& < 2500000 then
  584.                 spcneeded& = 2500000 - checkdspc&
  585.                 notenuff% = MessageBox(hwnd%,"Insufficient space on drive '" + checkdltr$ + "'.  Shortfall: " + str$(spcneeded&) + " bytes.","Sound Impression Setup",MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  586.                 If IDOK then
  587.                 GOTO GETPATHL1
  588.                 end if
  589.               end if
  590.         UIPop 1
  591.     ELSEIF sz$ = "REACTIVATE" THEN
  592.         GOTO GETPATHL1
  593.     ELSE
  594.         GOSUB ASKQUIT
  595.         GOTO GETPATH
  596.     END IF
  597. END IF  'Added for Sound Explorer setup
  598. 'End add for Soundexp
  599.  
  600. ''///////////////////////////// show destination path dialog (if deinstalling or changing cards)
  601.  
  602. If OPTCUR$ = "2" or OPTCUR$ = "3" then
  603.  
  604. CURPATH:
  605. UIPop 1
  606.     SetSymbolValue "EditTextIn", PATHNOW$
  607.     SetSymbolValue "EditFocus", "END"
  608. CURPATHL1:
  609. If SCRWID% = 640 then
  610.     sz$ = UIStartDlg(CUIDLL$, SIPATHX, "FEditDlgProc", 0, "")
  611. else
  612.     sz$ = UIStartDlg(CUIDLL$, SIPATH, "FEditDlgProc", 0, "")
  613. end if
  614.     PATHNOW$ = GetSymbolValue("EditTextOut")
  615.     IF sz$ = "CONTINUE" THEN
  616.         checkdltr2$ = mid$(PATHNOW$,1,1)
  617.         if checkdltr2$ <> "" then
  618.         checkexist2% = IsDriveValid(checkdltr2$)
  619.             If checkexist2% = 0 then
  620.             GOSUB BADPATH
  621.             GOTO CURPATHL1
  622.             end if
  623.         end if
  624.                 IF IsDirWritable(PATHNOW$) = 0 THEN
  625.                 GOSUB BADPATH
  626.                 GOTO CURPATHL1
  627.                 END IF
  628.         if OPTCUR$ = "2" then
  629.         checkaudiox% = DoesFileExist(MakePath (PATHNOW$,"AUDIOSIM.EXE"),femExists)
  630.                 If checkaudiox% = 0 then
  631.                 axnotfound% = MessageBox(hwnd%, "Sound Impression program not found in this directory.  Try again.", "Sound Impression Setup", MB_OK+MB_TASKMODAL+MB_ICONQUESTION)
  632.                 GOTO CURPATHL1
  633.                 end if
  634.         checkdspc2& = GetFreeSpaceForDrive(checkdltr2$)
  635.               if checkdspc2& < 850000 then
  636.                 spcneeded2& = 850000 - checkdspc2&
  637.                 notenuff2% = MessageBox(hwnd%,"Insufficient space on drive " + checkdltr2$ + "for Setup temp files.  Shortfall: " + str$(spcneeded2&) + " bytes.","Sound Impression Setup",MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  638.                 If IDOK then
  639.                 GOTO CURPATHL1
  640.                 end if
  641.               end if
  642.         end if
  643.         If OPTCUR$ = "3" then
  644.                 If REMIMPRESSION = "yes" then
  645.                 lastchance% = MessageBox(hwnd%, "Are you SURE you want to remove Sound Impression from your hard disk?", "Sound Impression Deinstall", MB_YESNO+MB_TASKMODAL+MB_ICONQUESTION)
  646.                         if IDYES then
  647.                         GOTO DEINSTALL
  648.                         else
  649.                         GOTO CURPATHL1
  650.                         end if
  651.                 END IF
  652.         END IF
  653.     UIPop 1
  654.     ELSEIF sz$ = "REACTIVATE" THEN
  655.         GOTO CURPATHL1
  656.     ELSE
  657.         GOSUB ASKQUIT
  658.         GOTO CURPATH
  659.     END IF
  660. end if
  661.  
  662. ''//////////////////////////////////////// prep status report items,
  663. ''//////////////////////////////////////// get Help file ready to call if needed
  664.  
  665. source$ = GetSymbolValue("STF_SRCDIR")
  666. helpsource$ = MakePath$(source$,"audiotec.hlp")
  667.  
  668. If OPTCUR$ = "1" then
  669. helploc$ = MakePath(DEST$,"audiotec.hlp")
  670. CopyFile helpsource$,helploc$,cmoOverwrite,0
  671. elseif OPTCUR$ = "2" then
  672. helploc$ = MakePath(PATHNOW$,"audiotec.hlp")
  673. CopyFile helpsource$,helploc$,cmoOverwrite,0
  674. end if
  675.  
  676. helptitle$ = "Sound Impression Help System"
  677. helpWnd% = FindWindow (NULL,helptitle$)
  678.  
  679. STATUSITEMS$ = "ListItemsIn"
  680. STATUSITEMSPICK$ = "ListItemsOut"
  681.  
  682. If CDD$ = "no" then
  683. AddListItem STATUSITEMS$,"**** CD-ROM driver not detected"
  684. end if
  685. If SEQ$ = "no" then
  686. AddListItem STATUSITEMS$,"**** MIDI driver not detected"
  687. end if
  688. If WAV$ = "no" then
  689. AddListItem STATUSITEMS$,"**** Wave audio driver not detected"
  690. end if
  691. If TIM$ = "no" then
  692. AddListItem STATUSITEMS$,"**** Multimedia Timer not detected"
  693. end if
  694.  
  695. AddListItem STATUSITEMS$,WORKSTRING$
  696. AddListItem STATUSITEMS$,VIRTSTRING$
  697. If wtempswapd$ <> "" Then
  698.         AddListItem STATUSITEMS$,TEMPSWAP$
  699. end if
  700. If wpermswapd$ <> "" Then
  701.         AddListItem STATUSITEMS$,PERMSWAP$
  702. else
  703.         AddListItem STATUSITEMS$,NOPERMSWAP$
  704. end if
  705. AddListItem STATUSITEMS$,wproctyprpt$
  706. If DOSVERRPT$ <> "" then
  707. AddListItem STATUSITEMS$,DOSVERRPT$
  708. end if
  709. If WINVERRPT <> "" then
  710. AddListItem STATUSITEMS$,WINVERRPT$
  711. end if
  712. If wmode% <> 2 then
  713. AddListItem STATUSITEMS$,WMODERPT$
  714. end if
  715. IF MOUSERPT$ <> "" then
  716. AddListItem STATUSITEMS$,MOUSERPT$
  717. end if
  718. IF ARIALRPT$ <> "" then
  719. AddListItem STATUSITEMS$,ARIALRPT$
  720. end if
  721. IF ARIALKEY$ <> "" then
  722. AddListItem STATUSITEMS$,ARIALKEY$
  723. end if
  724. If TRUTYPRPT$ <> "" then
  725. AddListItem STATUSITEMS$,TRUTYPRPT$
  726. end if
  727. If TRUTYPKEY$ <> "" then
  728. AddListItem STATUSITEMS$,TRUTYPKEY$
  729. end if
  730. If WBITRPT$ <> "" then
  731. AddListItem STATUSITEMS$,WBITRPT$
  732. end if
  733.  
  734. ''//////////////////////////////////////// show status report
  735.  
  736. SHOWTOP:
  737. sslistlen% = GetListLength(STATUSITEMS$)
  738. totop$ = GetListItem(STATUSITEMS$,1)
  739.     SetSymbolValue "ListItemsOut", totop$
  740. SHOWSTATS:
  741. if SCRWID% = 640 then
  742.     sz$ = UIStartDlg(CUIDLL$, STATUSREPORTX, "FListDlgProc", 0, "")
  743. else
  744.     sz$ = UIStartDlg(CUIDLL$, STATUSREPORT, "FListDlgProc", 0, "")
  745. end if
  746.         STATS$ = GetSymbolValue(STATUSITEMS$)
  747.         STATPICK$ = GetSymbolValue(STATUSITEMSPICK$)
  748.  
  749.    IF sz$ = "CONTINUE" THEN
  750.         If STATPICK$ = WORKSTRING$ then
  751.                 show10% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,10)
  752.                 GOTO SHOWSTATS
  753.         END IF
  754.         If STATPICK$ = VIRTSTRING$ then
  755.                 show20% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,20)
  756.                 GOTO SHOWSTATS
  757.         END IF
  758.         If STATPICK$ = NOPERMSWAP$ or STATPICK$ = PERMSWAP$ or STATPICK$ = TEMPSWAP$ then
  759.                 show30% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,30)
  760.                 GOTO SHOWSTATS
  761.         END IF
  762.         If STATPICK$ = wproctyprpt$ then
  763.                 show40% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,40)
  764.                 GOTO SHOWSTATS
  765.         END IF
  766.         If STATPICK$ = DOSVERRPT$ then
  767.                 show50% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,50)
  768.                 GOTO SHOWSTATS
  769.         END IF
  770.         If STATPICK$ = WINVERRPT$ or STATPICK$ = WMODERPT$ then
  771.                 show60% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,60)
  772.                 GOTO SHOWSTATS
  773.         END IF
  774.         If STATPICK$ = ARIALRPT$ or STATPICK$ = ARIALKEY$ then
  775.                 show70% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,70)
  776.                 GOTO SHOWSTATS
  777.         END IF
  778.         If STATPICK$ = TRUTYPKEY$ or STATPICK$ = TRUTYPRPT$ then
  779.                 show75% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,75)
  780.                 GOTO SHOWSTATS
  781.         END IF
  782.         If STATPICK$ = WBITRPT$ then
  783.                 show80% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,80)
  784.                 GOTO SHOWSTATS
  785.         END IF
  786.         If STATPICK$ = MOUSERPT$ then
  787.                 show90% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,90)
  788.                 GOTO SHOWSTATS
  789.         END IF
  790.         If STATPICK$ = "**** Wave audio driver not detected" then
  791.                 show100% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,100)
  792.                 GOTO SHOWSTATS
  793.         END IF
  794.         If STATPICK$ = "**** MIDI driver not detected" then
  795.                 show110% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,110)
  796.                 GOTO SHOWSTATS
  797.         END IF
  798.         If STATPICK$ = "**** CD-ROM driver not detected" then
  799.                 show120% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,120)
  800.                 GOTO SHOWSTATS
  801.         END IF
  802.         If STATPICK$ = "**** Multimedia Timer not detected" then
  803.                 show130% = WinHelp (mainWnd%,helploc$,HELP_CONTEXT,130)
  804.                 GOTO SHOWSTATS
  805.         END IF
  806.  
  807.     ELSEIF sz$ = "EXIT" THEN  ''note: this is actually the "continue" button
  808.         UIPop 1
  809.     ELSEIF sz$ = "REACTIVATE" THEN
  810.         GOTO SHOWSTATS
  811.     ELSE
  812.         GOSUB ASKQUIT
  813.         GOTO SHOWTOP
  814.     END IF
  815.  
  816.         SetSymbolValue "ListItemsIn",""
  817.         SetSymbolValue "ListItemsOut",""
  818.  
  819. ''//////////////////////////////////////// show card selection list
  820.  
  821. CARD$ = "ListItemsIn"
  822. CARDPICK$ = "ListItemsOut"
  823.         AddListItem CARD$,"UNLISTED"
  824.         AddListItem CARD$,"Antex VP Series"
  825.         AddListItem CARD$,"Antex Audio Port"
  826.         AddListItem CARD$,"Antex AV-16"
  827.         AddListItem CARD$,"Antex SX Series"
  828.         AddListItem CARD$,"ATI"
  829.         AddListItem CARD$,"Aztech"
  830.         AddListItem CARD$,"Cardinal"
  831.         AddListItem CARD$,"Creative Labs"
  832.         AddListItem CARD$,"Diamond SonicSound LX"
  833.         AddListItem CARD$,"Genoa Systems"
  834.         AddListItem CARD$,"Jovian Logic"
  835.         AddListItem CARD$,"Logitech SoundMan 16"
  836.         AddListItem CARD$,"Media Chips MAD-16"
  837.         AddListItem CARD$,"Media Master"
  838.         AddListItem CARD$,"Mediasonic"
  839.         AddListItem CARD$,"Media Vision all cards"
  840.         AddListItem CARD$,"Media Vision AudioPort"
  841.         AddListItem CARD$,"MIDI Land"
  842.         AddListItem CARD$,"Oak Mozart"
  843.         AddListItem CARD$,"Omni Labs AudioMaster"
  844.         AddListItem CARD$,"Orchid SoundWave 32"
  845.         AddListItem CARD$,"ProMEDIA"
  846.         AddListItem CARD$,"Roland RAP-10"
  847.         AddListItem CARD$,"Turtle Beach"
  848.  
  849. SINGLELIST:
  850.     SetSymbolValue "ListItemsOut", "UNLISTED"
  851.  
  852. LISTIT1:
  853. If SCRWID% = 640 then
  854.     sz$ = UIStartDlg(CUIDLL$, CARDLISTX, "FListDlgProc", APPHELPX, HELPPROC$)
  855. else
  856.     sz$ = UIStartDlg(CUIDLL$, CARDLIST, "FListDlgProc", APPHELP, HELPPROC$)
  857. end if
  858.         CARDLOADLIST$ = GetSymbolValue(CARD$)
  859.         SELECTED$ = GetSymbolValue(CARDPICK$)
  860.  
  861.     IF sz$ = "CONTINUE" THEN
  862.     UIPop 1
  863.  
  864.     ELSEIF sz$ = "REACTIVATE" THEN
  865.         GOTO LISTIT1
  866.     ELSE
  867.         GOSUB ASKQUIT
  868.         GOTO SINGLELIST
  869.     END IF
  870.  
  871.  
  872. ''//////////////////////////////////////// card selection is made; do install
  873.  
  874. INSTALL
  875.  
  876. ''//////////////////////////////////////// end checks & routines, cleanup
  877.  
  878. QUIT:
  879.     ON ERROR GOTO ERRQUIT
  880.  
  881.     IF ERR = 0 THEN
  882.  
  883.         SETUPOK = "success"
  884.         helpx% = WinHelp (mainWnd%,helploc$,HELP_QUIT,NULL)
  885.  
  886.         if SCRWID% = 640 then
  887.         dlg% = EXITSUCCESSX
  888.         else
  889.         dlg% = EXITSUCCESS
  890.         end if
  891.  
  892.     ELSEIF ERR = STFQUIT THEN
  893.         helpx% = WinHelp (mainWnd%,helploc$,HELP_QUIT,NULL)
  894.         if SCRWID% = 640 then
  895.         dlg% = EXITQUITX
  896.         else
  897.         dlg% = EXITQUIT
  898.         end if
  899.         REMOVESI
  900.     ELSE
  901.         helpx% = WinHelp (mainWnd%,helploc$,HELP_QUIT,NULL)
  902.         if SCRWID% = 640 then
  903.         dlg% = EXITFAILUREX
  904.         else
  905.         dlg% = EXITFAILURE
  906.         end if
  907.         REMOVESI
  908.     END IF
  909.  
  910. QUITL1:
  911.     sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
  912.     IF sz$ = "REACTIVATE" THEN
  913.         GOTO QUITL1
  914.     END IF
  915.         UIPop 1
  916.     END
  917.  
  918. ERRQUIT:
  919.     er% = ERR
  920.     WHATERR$ = ERROR$(er%)
  921.         iii% = DoMsgBox("Error "+ str$(er%) + ": "+ WHATERR$ + ". Call Technical Support.", "Sound Impression Setup Message", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  922.     END
  923.  
  924. BADPATH:
  925. if SCRWID% = 640 then
  926.     sz$ = UIStartDlg(CUIDLL$, BADPATHX, "FInfo0DlgProc", 0, "")
  927. else
  928.     sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
  929. end if
  930.     IF sz$ = "REACTIVATE" THEN
  931.         GOTO BADPATH
  932.     END IF
  933.     UIPop 1
  934.     RETURN
  935.  
  936. ASKQUIT:
  937. if SCRWID% = 640 then
  938.     sz$ = UIStartDlg(CUIDLL$, ASKQUITX, "FQuitDlgProc", 0, "")
  939. else
  940.     sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
  941. end if
  942.     DELETEFLAG$ = "NO"
  943.     IF sz$ = "EXIT" THEN
  944.         If OPTCUR$ = "1" then
  945.         RemoveFile MakePath(DEST$ , "audiotec.hlp"),cmoForce
  946.         elseif OPTCUR$ = "2" then
  947.         RemoveFile MakePath(PATHNOW$ , "audiotec.hlp"),cmoForce
  948.         end if
  949.         UIPopAll
  950.         ERROR STFQUIT
  951.     ELSEIF sz$ = "REACTIVATE" THEN
  952.         GOTO ASKQUIT
  953.     ELSE
  954.         UIPop 1
  955.     END IF
  956.     RETURN
  957.  
  958. ''//////////////////////////////////////// deinstallation sequence
  959. DEINSTALL:
  960. ON ERROR GOTO XDEINSTALL
  961. If REMIMPRESSION = "yes" then
  962.     CloseLogFile
  963.     logclosed% = 1
  964. RemoveFile MakePath(PATHNOW$ , "audiocmp.dll"),cmoForce
  965. RemoveFile MakePath(PATHNOW$ , "audiocnv.dll"),cmoForce
  966. RemoveFile MakePath(PATHNOW$ , "audioctl.dll"),cmoForce
  967. RemoveFile MakePath(PATHNOW$ , "audiodlg.dll"),cmoForce
  968. RemoveFile MakePath(PATHNOW$ , "audiodrv.dll"),cmoForce
  969. RemoveFile MakePath(PATHNOW$ , "audiomix.dll"),cmoForce
  970. RemoveFile MakePath(PATHNOW$ , "audiogpl.dll"),cmoForce
  971. RemoveFile MakePath(PATHNOW$ , "audioman.dll"),cmoForce
  972. RemoveFile MakePath(PATHNOW$ , "audioole.dll"),cmoForce
  973. RemoveFile MakePath(PATHNOW$ , "audiorak.dll"),cmoForce
  974. RemoveFile MakePath(PATHNOW$ , "audiosys.dll"),cmoForce
  975. RemoveFile MakePath(PATHNOW$ , "audiowam.dll"),cmoForce
  976. RemoveFile MakePath(PATHNOW$ , "audiowav.dll"),cmoForce
  977. RemoveFile MakePath(PATHNOW$ , "ms_entry.dll"),cmoForce
  978. RemoveFile MakePath(PATHNOW$ , "audiosim.exe"),cmoForce
  979. RemoveFile MakePath(PATHNOW$ , "audiohlp.hlp"),cmoForce
  980. RemoveFile MakePath(PATHNOW$ , "audiotec.hlp"),cmoForce
  981. RemoveFile MakePath(PATHNOW$ , "news01.txt"),cmoForce
  982. RemoveFile MakePath(PATHNOW$ , "logfile.out"),cmoForce
  983. RemoveFile MakePath(PATHNOW$ , "logfile.xx1"),cmoForce
  984. RemoveFile MakePath(PATHNOW$ , "logfile.xx2"),cmoForce
  985.  
  986. islog1% = DoesFileExist(MakePath(PATHNOW$,"logfile.out"),femExists)
  987. islog1b% = DoesFileExist(MakePath(PATHNOW$,"logfile.xx1"),femExists)
  988. islog2b% = DoesFileExist(MakePath(PATHNOW$,"logfile.xx2"),femExists)
  989. if log1% = 1 then
  990. RemoveFile MakePath(PATHNOW$ , "logfile.out"),cmoForce
  991. end if
  992. if log1b% = 1 then
  993. RemoveFile MakePath(PATHNOW$ , "logfile.xx1"),cmoForce
  994. end if
  995. if log2b% = 1 then
  996. RemoveFile MakePath(PATHNOW$ , "logfile.xx2"),cmoForce
  997. end if
  998.  
  999.         mixfilex$ = MakePath(PATHNOW$ , "MMMIXER.DLL")
  1000.         mmmdatex$ = GetDateOfFile(mixfilex$)
  1001.                         If mmmdatex$ = "1993-01-01-00-00-00" then
  1002.                            RemoveFile MakePath(PATHNOW$ , "mmmixer.dll"),cmoForce
  1003.                         end if
  1004.  
  1005. RemoveFile MakePath(WINDIRECT$ , "audio.ini"),cmoForce
  1006. RMDIR PATHNOW$
  1007. closeremoval% = MessageBox(hwnd%, "Sound Impression files have been removed.", "Sound Impression deinstallation", MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  1008. UIPopAll
  1009. stop
  1010.  
  1011. XDEINSTALL:
  1012. if exists (MakePath(PATHNOW$ , "*.*")) then
  1013. verifyfdel% = MessageBox(hwnd%, "One or more files (not identified as Sound Impression program files) remain in directory" + DEST$ + ".","Sound Impression Setup", MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  1014. else
  1015. CHDIR "c:\"
  1016. RMDIR PATHNOW$
  1017. end if
  1018. stop
  1019. end if
  1020.  
  1021. ''/////////////////////////////////////// installation subroutine (start)
  1022.  
  1023. SUB Install STATIC
  1024.  
  1025. RemoveSymbol "ListItemsIn"
  1026. RemoveSymbol "ListItemsOut"
  1027.  
  1028. SrcDir$ = GetSymbolValue("STF_SRCDIR")
  1029. If OPTCUR$ = "2" then
  1030. DEST$ = PATHNOW$
  1031. end if
  1032. CreateDir DEST$, cmoNone
  1033.  
  1034. '' //////////// (installation): create log file (rename old) and write stats
  1035.  
  1036.         islog2% = DoesFileExist(MakePath(DEST$,"logfile.xx1"),femExists)
  1037.         if islog2% = 1 then
  1038.                  RenameFile MakePath(DEST$ , "logfile.xx1"), "logfile.xx2"
  1039.         end if
  1040.         islog% = DoesFileExist(MakePath(DEST$,"logfile.out"),femExists)
  1041.         if islog% = 1 then
  1042.                  RenameFile MakePath(DEST$ , "logfile.out"), "logfile.xx1"
  1043.         end if
  1044.     OpenLogFile MakePath(DEST$, "LOGFILE.OUT"), 0
  1045.     WriteToLogFile ""
  1046.     WriteToLogFile "User chose as destination directory: '" + DEST$ + "'"
  1047.     WriteToLogFile "User chose option: '" + SELECTED$ + "'"
  1048.     WriteToLogFile ""
  1049.     WriteToLogFile "May have had to create the directory: " + DEST$
  1050.     WriteToLogFile ""
  1051.     WriteToLogFile "SYSTEM CONFIGURATION AT TIME OF INSTALLATION:"
  1052.     WriteToLogFile DOSVERRPT$
  1053.     WriteToLogFile WINVERRPT$
  1054.     WriteToLogFile WPROCTYPRPT$
  1055.     WriteToLogFile WORKSTRING$
  1056.     WriteToLogFile VIRTSTRING$
  1057.     WriteToLogFile PERMSWAP$
  1058.     WriteToLogFile TEMPSWAP$
  1059.     WriteToLogFile WBITRPT$
  1060.     WriteToLogFile MOUSERPT$
  1061.     WriteToLogFile WMODERPT$
  1062.     WriteToLogFile TRUTYPRPT$
  1063.     WriteToLogFile ARIALRPT$
  1064.     WriteToLogFile ""
  1065.  
  1066. '' //////////// (installation): establish copy file list, then copy files
  1067.  
  1068. AddSectionFilesToCopyList "Files", SrcDir$, DEST$
  1069.  
  1070. COPYNOW:
  1071. ''<<NEW block ends here
  1072.  
  1073. CopyFilesInCopyList
  1074.  
  1075. ''//////////// (installation): write initial audio.ini keys
  1076.  
  1077.     ini$ = MakePath(WINDIRECT$ , "AUDIO.INI")
  1078.  
  1079.     CreateIniKeyValue ini$, "SetupInfo",  "SetupPath", DEST$ , cmoOverwrite
  1080.     CreateIniKeyValue ini$, "SetupInfo",  "LastRunFrom", DEST$ + "\audiosim.exe", cmoOverwrite
  1081.     CreateIniKeyValue ini$, "SetupInfo",  "RATProduct", "No" , cmoOverwrite
  1082.     CreateIniKeyValue ini$, "SetupInfo",  "Running", "No" , cmoOverwrite
  1083.     CreateIniKeyValue ini$, "SetupInfo",  "MidiEditor", "None" , cmoOverwrite
  1084.  
  1085.     CreateIniKeyValue ini$, "Audio",      "PitchType", "Fixed", cmoOverwrite
  1086.     CreateIniKeyValue ini$, "Audio",      "VirtualBoundary", "2" , cmoOverwrite
  1087.  
  1088.     CreateIniKeyValue ini$, "AudioLevel", "InputImpedance", "Mic", cmoOverwrite
  1089.     CreateIniKeyValue ini$, "AudioLevel", "InputPatch", "On" , cmoOverwrite
  1090.     CreateIniKeyValue ini$, "AudioLevel", "OutputPatch", "On" , cmoOverwrite
  1091.     CreateIniKeyValue ini$, "AudioLevel", "MicPatch", "Record" , cmoOverwrite
  1092.     CreateIniKeyValue ini$, "AudioLevel", "LinePatch", "Record" , cmoOverwrite
  1093.     CreateIniKeyValue ini$, "AudioLevel", "AuxPatch", "Record" , cmoOverwrite
  1094.     CreateIniKeyValue ini$, "AudioLevel", "Focus", "Mic" , cmoOverwrite
  1095.     CreateIniKeyValue ini$, "AudioLevel", "OutputChannels", "Normal", cmoOverwrite
  1096.  
  1097.        if SELECTED$ = "UNLISTED" then
  1098.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1099.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1100.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1101.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "11025" , cmoOverwrite
  1102.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1103.         end if
  1104.        if SELECTED$ = "Antex VP Series" then
  1105.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1106.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1107.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1108.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "7100" , cmoOverwrite
  1109.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "36000" , cmoOverwrite
  1110.         end if
  1111.        if SELECTED$ = "Antex Audio Port" then
  1112.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1113.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1114.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1115.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "7100" , cmoOverwrite
  1116.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "36000" , cmoOverwrite
  1117.         end if
  1118.        if SELECTED$ = "Antex AV-16" then
  1119.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1120.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1121.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1122.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "6000" , cmoOverwrite
  1123.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "32000" , cmoOverwrite
  1124.         end if
  1125.        if SELECTED$ = "Antex: SX Series" then
  1126.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1127.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1128.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1129.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "6250" , cmoOverwrite
  1130.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "50000" , cmoOverwrite
  1131.         end if
  1132.         if SELECTED$ = "ATI" then
  1133.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1134.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1135.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1136.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "5000" , cmoOverwrite
  1137.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1138.         end if
  1139.        if SELECTED$ = "Aztech" then
  1140.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1141.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1142.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1143.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "5000" , cmoOverwrite
  1144.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1145.         end if
  1146.        if SELECTED$ = "Cardinal" then
  1147.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1148.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1149.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1150.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "5000" , cmoOverwrite
  1151.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1152.         end if
  1153.         if SELECTED$ = "Creative Labs" then
  1154.     CreateIniKeyValue ini$, "Audio", "MixerType", "Creative" , cmoOverwrite
  1155.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1156.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1157.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "4001" , cmoOverwrite
  1158.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1159.         end if
  1160.        if SELECTED$ = "Diamond SonicSound LX" then
  1161.     CreateIniKeyValue ini$, "Audio", "MixerType", "MediaChips" , cmoOverwrite
  1162.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1163.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1164.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "11025" , cmoOverwrite
  1165.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1166.         end if
  1167.        if SELECTED$ = "Genoa Systems" then
  1168.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "Yes", cmoOverwrite
  1169.     CreateIniKeyValue ini$, "Audio", "MixerType", "Genoa" , cmoOverwrite
  1170.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1171.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "11025" , cmoOverwrite
  1172.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1173.         end if
  1174.        if SELECTED$ = "Jovian Logic" then
  1175.     CreateIniKeyValue ini$, "Audio", "MixerType", "Jovian" , cmoOverwrite
  1176.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1177.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1178.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "11025" , cmoOverwrite
  1179.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1180.         end if
  1181.        if SELECTED$ = "Logitech SoundMan 16" then
  1182.     CreateIniKeyValue ini$, "Audio", "MixerType", "MediaVision" , cmoOverwrite
  1183.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1184.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1185.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "5000" , cmoOverwrite
  1186.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1187.         end if
  1188.        if SELECTED$ = "Media Chips MAD-16" then
  1189.     CreateIniKeyValue ini$, "Audio", "MixerType", "MediaChips" , cmoOverwrite
  1190.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1191.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1192.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "11025" , cmoOverwrite
  1193.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1194.         end if
  1195.        if SELECTED$ = "Media Master" then
  1196.     CreateIniKeyValue ini$, "Audio", "MixerType", "MediaMaster" , cmoOverwrite
  1197.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1198.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1199.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "11025" , cmoOverwrite
  1200.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1201.         end if
  1202.        if SELECTED$ = "Media Vision all cards" then
  1203.     CreateIniKeyValue ini$, "Audio", "MixerType", "MediaVision" , cmoOverwrite
  1204.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1205.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1206.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "5000" , cmoOverwrite
  1207.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1208.     CreateIniKeyValue ini$, "AudioLevel", "OutputChannels", "Reversed", cmoOverwrite
  1209.         end if
  1210.        if SELECTED$ = "Media Vision AudioPort" then
  1211.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1212.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1213.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1214.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "5000" , cmoOverwrite
  1215.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1216.         end if
  1217.        if SELECTED$ = "Mediasonic" then
  1218.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1219.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1220.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1221.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "11025" , cmoOverwrite
  1222.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1223.         end if
  1224.         if SELECTED$ = "MIDI Land" then
  1225.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1226.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1227.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1228.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "5000" , cmoOverwrite
  1229.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1230.         end if
  1231.        if SELECTED$ = "Oak Mozart" then
  1232.     CreateIniKeyValue ini$, "Audio", "MixerType", "MediaChips" , cmoOverwrite
  1233.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1234.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1235.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "11025" , cmoOverwrite
  1236.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1237.         end if
  1238.         if SELECTED$ = "Omni Labs AudioMaster" then
  1239.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1240.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1241.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1242.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "5000" , cmoOverwrite
  1243.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1244.         end if
  1245.         if SELECTED$ = "Orchid SoundWave 32" then
  1246.     CreateIniKeyValue ini$, "Audio", "MixerType", "Orchid" , cmoOverwrite
  1247.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1248.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Fixed" , cmoOverwrite
  1249.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "11025" , cmoOverwrite
  1250.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1251.         end if
  1252.         if SELECTED$ = "ProMEDIA" then
  1253.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1254.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1255.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1256.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "6300" , cmoOverwrite
  1257.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "48000" , cmoOverwrite
  1258.         end if
  1259.         if SELECTED$ = "Roland RAP-10" then
  1260.     CreateIniKeyValue ini$, "Audio", "MixerType", "Roland" , cmoOverwrite
  1261.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1262.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1263.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "5000" , cmoOverwrite
  1264.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "88200" , cmoOverwrite
  1265.         end if
  1266.         if SELECTED$ = "Turtle Beach" then
  1267.     CreateIniKeyValue ini$, "Audio", "MixerType", "Standard" , cmoOverwrite
  1268.     CreateIniKeyValue ini$, "Audio", "RoundMixerKnobs", "No", cmoOverwrite
  1269.     CreateIniKeyValue ini$, "Audio", "SamplerType", "Variable" , cmoOverwrite
  1270.     CreateIniKeyValue ini$, "Audio", "SamplerMin", "5000" , cmoOverwrite
  1271.     CreateIniKeyValue ini$, "Audio", "SamplerMax", "44100" , cmoOverwrite
  1272.         end if
  1273.  
  1274. ''///////////////// (installation): check if PM present; if so, create group & add items
  1275. 'Commented out for Soundexp install - do not show program groups
  1276. 'findpm$ = FindTargetOnEnvVar("progman.exe","path")
  1277. 'if findpm$ <> "" then
  1278. '
  1279.  '   CreateProgmanGroup "Sound Impression", "", cmoNone
  1280. '    ShowProgmanGroup  "Sound Impression", 1, cmoNone
  1281. '    CreateProgmanItem "Sound Impression", "Sound Impression", MakePath(DEST$ , "audiosim.exe"), "", cmoOverwrite
  1282. '    CreateProgmanItem "Sound Impression", "Sound Impression Help", MakePath(DEST$ , "audiohlp.hlp"), "", cmoOverwrite
  1283. '
  1284. 'else
  1285. 'nopm% = MessageBox(hwnd%,"Program Manager not found on your path. Add Sound Impression paths and properties to your shell after installation.", "Sound Impression Setup)", MB_OK+MB_ICONINFORMATION)
  1286. 'end if
  1287.  
  1288. ''///////////////// (installation): if the logfile isn't already closed, close it and end setup
  1289.  
  1290. if logclosed% = 0 then
  1291.     CloseLogFile
  1292. end if
  1293.  
  1294. END SUB
  1295.  
  1296. ''/////////////////////////////////// end subroutine
  1297.  
  1298. SUB FINIS STATIC
  1299. If SETUPOK = "success" then
  1300. endit:
  1301. end if
  1302. END SUB
  1303.  
  1304. ''/////////////////////////////////// subroutine to remove SI files & destination directory
  1305. ''/////////////////////////////////// if process cancelled by user
  1306.  
  1307. SUB REMOVESI STATIC
  1308. If DELETEFLAG = "" THEN
  1309. verifydel1% = MessageBox(hwnd%, "Remove Sound Impression files from " + DEST$ + "?","Sound Impression Setup", MB_YESNO+MB_TASKMODAL+MB_ICONQUESTION)
  1310.         if verifydel1% = IDYES then
  1311.     CloseLogFile
  1312.     logclosed% = 1
  1313. RemoveFile MakePath(DEST$ , "audiocmp.dll"),cmoForce
  1314. RemoveFile MakePath(DEST$ , "audiocnv.dll"),cmoForce
  1315. RemoveFile MakePath(DEST$ , "audioctl.dll"),cmoForce
  1316. RemoveFile MakePath(DEST$ , "audiodlg.dll"),cmoForce
  1317. RemoveFile MakePath(DEST$ , "audiomix.dll"),cmoForce
  1318. RemoveFile MakePath(DEST$ , "audiogpl.dll"),cmoForce
  1319. RemoveFile MakePath(DEST$ , "audioman.dll"),cmoForce
  1320. RemoveFile MakePath(DEST$ , "audioole.dll"),cmoForce
  1321. RemoveFile MakePath(DEST$ , "audiorak.dll"),cmoForce
  1322. RemoveFile MakePath(DEST$ , "audiosys.dll"),cmoForce
  1323. RemoveFile MakePath(DEST$ , "audiowam.dll"),cmoForce
  1324. RemoveFile MakePath(DEST$ , "audiowav.dll"),cmoForce
  1325. RemoveFile MakePath(DEST$ , "ms_entry.dll"),cmoForce
  1326. RemoveFile MakePath(DEST$ , "audiosim.exe"),cmoForce
  1327. RemoveFile MakePath(DEST$ , "audiohlp.hlp"),cmoForce
  1328. RemoveFile MakePath(DEST$ , "audiotec.hlp"),cmoForce
  1329. RemoveFile MakePath(DEST$ , "news01.txt"),cmoForce
  1330. RemoveFile MakePath(DEST$ , "logfile.out"),cmoForce
  1331. RemoveFile MakePath(DEST$ , "logfile.xx1"),cmoForce
  1332. RemoveFile MakePath(DEST$ , "logfile.xx2"),cmoForce
  1333.  
  1334. islog1% = DoesFileExist(MakePath(DEST$,"logfile.out"),femExists)
  1335. islog1b% = DoesFileExist(MakePath(DEST$,"logfile.xx1"),femExists)
  1336. islog2b% = DoesFileExist(MakePath(DEST$,"logfile.xx2"),femExists)
  1337. if log1% = 1 then
  1338. RemoveFile MakePath(DEST$ , "logfile.out"),cmoForce
  1339. end if
  1340. if log1b% = 1 then
  1341. RemoveFile MakePath(DEST$ , "logfile.xx1"),cmoForce
  1342. end if
  1343. if log2b% = 1 then
  1344. RemoveFile MakePath(DEST$ , "logfile.xx2"),cmoForce
  1345. end if
  1346.  
  1347.         isit2% = DoesFileExist(MakePath(WINDIRECT$,"audio.ini"),femExists)
  1348.         if isit2% = 1 then
  1349.                 verifydel2% = MessageBox(hwnd%, "Sound Impression initialization file (AUDIO.INI) was found in " + WINDIRECT$ + ". Remove it?","Sound Impression Setup", MB_YESNO+MB_TASKMODAL+MB_ICONQUESTION)
  1350.                 if verifydel2% = IDYES then
  1351.                 RemoveFile MakePath(WINDIRECT$ , "audio.ini"),cmoForce
  1352.                 end if
  1353.         end if
  1354.  
  1355.         mixfiley$ = MakePath(DEST$ , "MMMIXER.DLL")
  1356.         mmmdatey$ = GetDateOfFile(mixfiley$)
  1357.                          If mmmdatey$ = "1993-01-01-00-00-00" then
  1358.                                     RemoveFile MakePath(DEST$ , "mmmixer.dll"),cmoForce
  1359.                          end if
  1360.  
  1361. ''<<<NEW:'end if' that was here moved to end of this sub (it's the third one down there)
  1362. if exists (MakePath(DEST$ , "*.*")) then
  1363. verifydel3% = MessageBox(hwnd%, "One or more files (not identified as Sound Impression program files) remain in directory" + DEST$ + ".","Sound Impression Setup", MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  1364. else
  1365. DESTDRV$ = MID$(DEST$,1,3) ''<<<NEW
  1366. CHDIR DESTDRV$             ''<<<NEW
  1367. RMDIR DEST$
  1368. end if
  1369. end if
  1370. end if
  1371.  
  1372. END SUB
  1373.  
  1374. ''/////////////////////////////////////// script functions
  1375.  
  1376. FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
  1377.     IF szDir$ = "" THEN
  1378.         MakePath = szFile$
  1379.     ELSEIF szFile$ = "" THEN
  1380.         MakePath = szDir$
  1381.     ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
  1382.         MakePath = szDir$ + szFile$
  1383.     ELSE
  1384.         MakePath = szDir$ + "\" + szFile$
  1385.     END IF
  1386. END FUNCTION
  1387.  
  1388.