home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Classic / MultimediaClassic.mdf / app_main / dragdict / disk1 / ddwin.ms_ / ddwin.ms
Encoding:
Text File  |  1994-08-03  |  16.8 KB  |  575 lines

  1. '**************************************************************************
  2. '*   MSSetup Script for installing DDWin
  3. '*
  4. '* PROJECT: DragonDictate for Windows
  5. '* CREATED: 1 Apr 1994
  6. '* AUTHOR:  Steve Squires
  7. '*
  8. '* (C) Copyright Dragon Systems, Inc. 1993-1994.
  9. '* All Rights Reserved
  10. '*
  11. '* ** DRAGON SYSTEMS CONFIDENTIAL **
  12. '*
  13. '*
  14. '* History
  15. ''    *tlib-revision-history*
  16. ''    *tlib-revision-history*
  17. ''  changed embedded "readme.wri" to READ_ME from 'localize.inc'
  18. ''
  19. ''  Changed initial sound board setting from 'BestTry' to 'MMLevel'
  20. ''
  21. ''  fixed MakePath to handle "" argument properly and return just the
  22. ''  install destination path
  23. ''
  24. ''  now showing normal mouse cursor during main copying, since there
  25. ''  is a dialog with a Cancel button on it during this time
  26. ''
  27. ''  now adding 5MB to estimate of disk space needed.  This compensates for
  28. ''  inaccurate estimates from DoubleSpace, Stacker, etc.  5MB was picked since
  29. ''  it is roughly what is needed to create initial user, which will almost
  30. ''  always be done right after install anyway.
  31. ''
  32. ''  now manually copying README.WRI from Setup Disk1 to target install path
  33. ''    so Setup program does not complain when QA updates it and changes
  34. ''    file size at last minute
  35. ''
  36. ''  FILEPATH_INSTALL moved to localize.inc for localization
  37. ''  now prototyping ReportBufferOverflow from localize.inc BEFORE include
  38. ''    of setupapi.inc for clean internationalization with a single .inc file
  39. ''
  40. ''  now deleting any pre-existing base .USR files in install directory
  41. ''
  42. ''  fixed problem checking for existing version
  43. ''
  44. ''  tracking phrases voc now called Tracking
  45. ''  Dictation base voc now gone
  46. ''  added Tracking/prnbuild to systems word vocs
  47. ''
  48. ''  INI file now called Dragon.INI
  49. ''
  50. ''  now displaying disk space requirements in K, checking for ACPA driver
  51. ''  DragDev parameters now in DGNSRVR.INI
  52. ''
  53. ''  fixed problems handling 'this disk doesn't have enough space try another'
  54. ''
  55. ''  now passes path of Setup disks to SetAppSpecificIniStuff
  56. ''
  57. ''  switched install model to merely ask for all base files or none.
  58. ''   initial User always created by DDWin itself
  59. ''
  60. '*  reconfigured for international setups
  61. ''
  62. '*  sds        11 Mar 1994        updated for different INI file layout
  63. '*                now loads backup dictation vocs
  64. '*  sds        24 Feb 1994        enabled update of VoiceBar.exe with owner/org
  65. '*  sds        23 Feb 1994        now adds a ton of App-Specific stuff to INI file
  66. '*  sds        26 Jan 1994        changed title to DragonDictate for Windows
  67. '*  sds        12 Jan 1994        fixed bug setting wrong bringup group in .INI
  68. '*  sds        13 Dec 1993        Progman group now "DragonDictate for Windows"
  69. '*  sds        6 Dec 1993        removed space from DragonDictate
  70. '*  sds        30 Nov 1993     adapted from Talk->To version
  71. '*
  72. '**************************************************************************
  73.  
  74. '* '$DEFINE DEBUG  ''Define for script development/debugging
  75.  
  76. '' actually defined in localize.inc, but setupapi.inc calls it
  77. DECLARE FUNCTION ReportBufferOverflow( ) AS INTEGER
  78.  
  79. '$INCLUDE 'setupapi.inc'
  80. '$INCLUDE 'msdetect.inc'
  81.  
  82. DECLARE FUNCTION DlgGetUserOrg LIB "mscuistf.dll" AS INTEGER
  83. DECLARE FUNCTION DlgSetUserOrg LIB "mscuistf.dll" AS INTEGER
  84. DECLARE FUNCTION CheckMMDriver LIB "mscuistf.dll" AS INTEGER
  85.  
  86. ''Dialog ID's
  87. CONST DLG_WELCOME       = 100
  88. CONST DLG_ASKQUIT       = 200
  89. CONST DLG_DESTPATH      = 300
  90. CONST DLG_EXITFAILURE   = 400
  91. CONST DLG_EXITQUIT      = 600
  92. CONST DLG_EXITSUCCESS   = 700
  93.  
  94. CONST DLG_APPHELP       = 900
  95.  
  96. CONST DLG_BADPATH       = 6400
  97. CONST DLG_USERNAME  = 7900
  98. CONST DLG_NOWAY = 8000
  99. CONST DLG_REPLACE = 8100
  100. CONST DLG_WRITEPROTECT = 8200
  101. CONST DLG_NOSPACE = 8300
  102. CONST DLG_BASENAME = 8400
  103.  
  104.  
  105. ''Bitmap ID
  106. CONST LOGO = 1
  107.  
  108. ''
  109. ''File Names and other version-dependent strings
  110. ''
  111. CONST FILE_INI = "dragon.INI"
  112. CONST FILE_INF = "ddwin.INF"
  113. CONST FILE_TOOLBAR = "voicebar.exe"
  114.  
  115. DECLARE FUNCTION MakePath (szFile$) AS STRING
  116.  
  117. '' this include file depends on FILE_TOOLBAR defined above
  118. '$INCLUDE 'localize.inc'
  119.  
  120. GLOBAL DEST$        ''Default destination directory.
  121. GLOBAL OPTCUR$      ''Option selection from option dialog.
  122. GLOBAL UserName$    '' user name for registration
  123. GLOBAL UserCmdFileName$    '' name of Command-mode main vocabulary
  124. GLOBAL UserDictFileName$    '' name of Dictation vocabulary
  125. GLOBAL SrcPath$      '' where Setup is coming from
  126. GLOBAL OrgName$
  127. GLOBAL Title$
  128. GLOBAL SetupTitle$      '' used for msg boxes
  129. GLOBAL ProgmanTitle$      '' used for Program Manager group
  130. GLOBAL CUIDLL$
  131. GLOBAL ReInstall%
  132. GLOBAL AllBases%
  133. GLOBAL bFixingPath%
  134.  
  135. DECLARE SUB Install
  136.  
  137. INIT:
  138.     CUIDLL$ = "mscuistf.dll"            ''Custom user interface dll
  139.     HELPPROC$ = "FHelpDlgProc"          ''Help dialog procedure
  140.  
  141.     DEST$ = FILEPATH_INSTALL        ''Default target directory
  142.  
  143.     SetBitmap CUIDLL$, LOGO
  144.     Title$ = STR_TITLE
  145.  
  146.     SetupTitle$ = Title$ + STR_SETUP
  147.     ProgmanTitle$ = Title$
  148.  
  149.     SetTitle Title$
  150.  
  151.     '' assume this is not a re-install
  152.     ReInstall% = 0
  153.  
  154.     SetSymbolValue "UserName", ""
  155.     SetSymbolValue "UserOrg", ""
  156.  
  157.     '' DlgGetUserOrg isn't a dialog box routine at all, it's just named
  158.     '' that way to deter hackers.  It really extracts the user name and
  159.     '' organization from the magic file on first setup disk
  160.     i% = DlgGetUserOrg()
  161.     T$ = GetSymbolValue("BADUSERORGFILE")
  162.     if T$ = "Y" THEN
  163.     '' somebody mucked with user/organization file
  164.     GOTO ERRQUIT
  165.     END IF
  166.     UserName$ = GetSymbolValue("UserName")
  167.     cch% = len(UserName$)
  168.     if cch% > 0 then
  169.     '' re-install from same diskettes
  170.     ReInstall% = 1
  171.     end if
  172.  
  173.     szInf$ = GetSymbolValue("STF_SRCINFPATH")
  174.     IF szInf$ = "" THEN
  175.         szInf$ = GetSymbolValue("STF_CWDDIR") + FILE_INF
  176.     END IF
  177.     ReadInfFile szInf$
  178.  
  179.     OPTCUR$ = "1"
  180.  
  181. '$IFDEF DEBUG
  182.     i% = SetSizeCheckMode(scmOnIgnore)    '' could use scmOff; def = scmOnFatal
  183.     WinDrive$ = MID$(GetWindowsDir(), 1, 1)
  184.     IF IsDriveValid(WinDrive$) = 0 THEN
  185.         i% = DoMsgBox("Windows drive ('"+WinDrive$+"') is not a valid drive.", "DEBUG", MB_TASKMODAL+MB_ICONHAND+MB_OK)
  186.         GOTO QUIT
  187.     END IF
  188. '$ENDIF ''DEBUG
  189.  
  190.                 
  191. WELCOME:
  192.     sz$ = UIStartDlg(CUIDLL$, DLG_WELCOME, "FWelcomeDlgProc", DLG_APPHELP, HELPPROC$)
  193.     IF sz$ = "CONTINUE" THEN
  194.         UIPop 1
  195.     ELSE
  196.         GOSUB ASKQUIT
  197.         GOTO WELCOME
  198.     END IF
  199.  
  200.     bFixingPath% = 0
  201.  
  202. GETPATH:
  203.     SetSymbolValue "EditTextIn", DEST$
  204.     SetSymbolValue "EditFocus", "END"
  205. GETPATHL1:
  206.     sz$ = UIStartDlg(CUIDLL$, DLG_DESTPATH, "FEditDlgProc", DLG_APPHELP, HELPPROC$)
  207.     IF sz$ = "CONTINUE" THEN
  208.     DEST$ = GetSymbolValue("EditTextOut")
  209.         IF IsDirWritable(DEST$) = 0 THEN
  210.             GOSUB BADPATH
  211.             GOTO GETPATHL1
  212.         END IF
  213.         UIPop 1
  214.     ELSEIF sz$ = "REACTIVATE" THEN
  215.         GOTO GETPATHL1
  216.     ELSEIF sz$ = "BACK" THEN
  217.         UIPop 1
  218.     if bFixingPath% = 1 then
  219.         '' We got here after asking everything and then finding out ther3
  220.         '' was not enuf disk space.  User wanted to change install
  221.         '' directory, then pressed 'Back'.  Most useful thing to do
  222.         '' is back up to GetBases (which was the last regular dialog)
  223.         '' where they can un-select install of
  224.         '' more base files than disk can handle.
  225.         bFixingPath% = 0
  226.         goto GetBases
  227.     end if
  228.         GOTO WELCOME
  229.     ELSE
  230.         GOSUB ASKQUIT
  231.         GOTO GETPATH
  232.     END IF
  233.  
  234. '' check directory
  235. CheckDir:
  236.     SrcPath$ = GetSymbolValue("SRCPATH")
  237.  
  238.     i% = DoesDirExist(DEST$)
  239.     IF i% > 0 THEN
  240.     '' directory exists
  241.     i% = DoesFileExist(MakePath(FILE_TOOLBAR), femExists)
  242.     IF i% > 0 THEN
  243.         '' there is an existing version installed
  244.         Date_Already$ = GetDateOfFile(MAKEPATH(FILE_TOOLBAR))
  245.         '' just want yyyy-mm-dd
  246.         Date_Already$ = MID$( Date_Already$, 1, 10)
  247.         IF Date_Already$ > "1990" THEN
  248.         '' have a file to compare to
  249.         Date_This$ = GetSectionKeyDate("Files", "voicebar")
  250.         if Date_This$ < "1990" then
  251.             '' did not find key in .INF file
  252.             ERROR STFERR
  253.         end if
  254.         IF Date_This$ = Date_Already$ OR Date_This$ > Date_Already$ THEN
  255.             '' installing same or newer version - warn'em
  256.             sz$ = UIStartDlg(CUIDLL$, DLG_REPLACE, "FReplaceDlgProc", 0, "")
  257.             UIPop 1
  258.             IF sz$ = "CONTINUE" THEN
  259.             if bFixingPath% = 1 then
  260.                 '' have already asked other questions - just fixing
  261.                 '' path on no-disk-space problem
  262.                 goto CheckSpace
  263.             end if
  264.             GOTO GetUser
  265.             ELSE
  266.             GOTO GetPath
  267.             END IF
  268.         ELSE
  269.             '' installing OLDER version over newer - no way
  270.             SetSymbolValue "EditTextIn", DEST$
  271.             SetSymbolValue "EditFocus", "END"
  272. CheckDir1:
  273.             sz$ = UIStartDlg(CUIDLL$, DLG_NOWAY, "FEditDlgProc", DLG_APPHELP, HELPPROC$)
  274.             IF sz$ = "CONTINUE" THEN
  275.             DEST$ = GetSymbolValue("EditTextOut")
  276.             IF IsDirWritable(DEST$) = 0 THEN
  277.                 GOSUB BADPATH
  278.                 GOTO CheckDir1
  279.             END IF
  280.             UIPop 1
  281.             GOTO CheckDir
  282.             ELSEIF sz$ = "REACTIVATE" THEN
  283.             GOTO CheckDir1
  284.             ELSEIF sz$ = "BACK" THEN
  285.             UIPop 1
  286.             GOTO GETPATH
  287.             ELSE
  288.             GOSUB ASKQUIT
  289.             GOTO CheckDir
  290.             END IF
  291.         END IF
  292.         END IF
  293.     END IF
  294.     END IF
  295.  
  296. if bFixingPath% = 1 then
  297.     '' have already asked other questions - just fixing
  298.     '' path on no-disk-space problem
  299.     goto CheckSpace
  300. end if
  301.  
  302. GETUSER:
  303.     if ReInstall% > 0 then
  304.     goto SkipGetUser
  305.     end if
  306.  
  307.     SetSymbolValue "EditTextIn", UserName$
  308.     S$ = GetSymbolValue("UserOrg")
  309.     SetSymbolValue "EditTextIn2", S$
  310.     SetSymbolValue "EditFocus", "END"
  311. GETUSER1:
  312.     sz$ = UIStartDlg(CUIDLL$, DLG_USERNAME, "FEditDlgProc", DLG_APPHELP, HELPPROC$)
  313.  
  314.     IF sz$ = "CONTINUE" THEN
  315.     '' dlgbox guarantees will not be empty
  316.     UserName$ = GetSymbolValue("EditTextOut")
  317.         UIPop 1
  318.     ELSEIF sz$ = "REACTIVATE" THEN
  319.         GOTO GETUSER1
  320.     ELSEIF sz$ = "BACK" THEN
  321.         UIPop 1
  322.     GOTO GETPATH
  323.     ELSEIF sz$ = "WriteProtect" THEN
  324.     sz$ = UIStartDlg(CUIDLL$, DLG_WRITEPROTECT, "FQuitDlgProc", DLG_APPHELP, HELPPROC$)
  325.     UIPopAll
  326.         ERROR STFQUIT
  327.     ELSE
  328.         GOSUB ASKQUIT
  329.         GOTO GETUSER
  330.     END IF
  331.  
  332. SkipGetUser:
  333.  
  334. '' ask if user wants base files pre-installed
  335. GETBASES:
  336.     SetSymbolValue "AllBases", "0"
  337. GETBASE1:
  338.     sz$ = UIStartDlg(CUIDLL$, DLG_BASENAME, "BaseDlgProc", DLG_APPHELP, HELPPROC$)
  339.  
  340.     IF sz$ = "CONTINUE" THEN
  341.     sz$ = GetSymbolValue("AllBases")
  342.     if sz$ = "0" then
  343.         AllBases% = 0
  344.     else
  345.         AllBases% = 1
  346.     end if
  347.         UIPop 1
  348.     ELSEIF sz$ = "REACTIVATE" THEN
  349.         GOTO GETBASE1
  350.     ELSEIF sz$ = "BACK" THEN
  351.         UIPop 1
  352.     if ReInstall% > 0 then
  353.         '' is re-install - we never asked for user
  354.         goto GETPATH
  355.     else
  356.         GOTO GETUSER
  357.     end if
  358.     ELSE
  359.         GOSUB ASKQUIT
  360.         GOTO GETBASES
  361.     END IF
  362.  
  363. CheckSpace:
  364.     hPrev% = ShowWaitCursor()
  365.  
  366.     '' put together copy list so we can figure out space requirements
  367.     SrcDir$ = GetSymbolValue("STF_SRCDIR")
  368.  
  369.     ClearCopyList
  370.     AddSectionFilesToCopyList "Files", SrcDir$, DEST$
  371.  
  372.     if AllBases% = 1 then
  373.     AddBaseFiles GetWindowsDir() + FILE_INI, SrcDir$, DEST$
  374.     end if
  375.  
  376.     '' which drive are we installing on ?
  377.     diskNumber% = Asc(DEST$) - Asc( "A" )
  378.  
  379.     '' ask for 5MB extra for that drive.  This both provides a decent chance
  380.     '' of being able to create a new user, and also compensates for
  381.     '' DoubleSpace and its kin which lie about how much disk space there is.
  382.     SetSymbolValue "Extra", ""
  383.     for i% = 1 to diskNumber%
  384.     AddListItem "Extra", ""
  385.     next i%
  386.     AddListItem "Extra", "5242880"
  387.  
  388.     '' now see if there is enough space
  389.     lNeeded& = GetCopyListCost( "Extra", szCost$, szNeeded$ )
  390.  
  391.     RestoreCursor hPrev%
  392.  
  393.     if lNeeded& > 0 then
  394.     '' insufficient disk space - warn user
  395.     lNeeded& = (lNeeded& / 1024) + 1
  396.     SetSymbolValue "SpaceNeeded", STR$(lNeeded&)
  397.     sz$ = UIStartDlg(CUIDLL$, DLG_NOSPACE, "FNoSpaceDlgProc", DLG_APPHELP, HELPPROC$)
  398.     if sz$ = "CONTINUE" then
  399.         UIPop 1
  400.         '' see if they really freed enough space
  401.         goto CheckSpace
  402.     elseif sz$ = "BACK" then
  403.         UIPop 1
  404.         '' try another drive
  405.         bFixingPath% = 1
  406.         goto GETPATH
  407.     else
  408.         UIPopAll
  409.         ERROR STFQUIT
  410.     end if
  411.     end if
  412.  
  413.     Install
  414.  
  415.     i% = CheckMMDriver()
  416.  
  417. QUIT:
  418.     ON ERROR GOTO ERRQUIT
  419.  
  420.     IF ERR = 0 THEN
  421.         dlg% = DLG_EXITSUCCESS
  422.  
  423.     SetSymbolValue "InstallPath", DEST$
  424.     SetSymbolValue "ReadMeCmd", "Write " + MAKEPATH( READ_ME )
  425.  
  426.     ELSEIF ERR = STFQUIT THEN
  427.         dlg% = DLG_EXITQUIT
  428.     ELSE
  429.         dlg% = DLG_EXITFAILURE
  430.     END IF
  431. QUITL1:
  432.     sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
  433.     IF sz$ = "REACTIVATE" THEN
  434.         GOTO QUITL1
  435.     END IF
  436.     UIPop 1
  437.  
  438.     END
  439.  
  440. ERRQUIT:
  441.     i% = DoMsgBox(STR_CORRUPTED, STR_TITLE, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  442.     END
  443.  
  444. BADPATH:
  445.     sz$ = UIStartDlg(CUIDLL$, DLG_BADPATH, "FInfo0DlgProc", 0, "")
  446.     IF sz$ = "REACTIVATE" THEN
  447.         GOTO BADPATH
  448.     END IF
  449.     UIPop 1
  450.     RETURN
  451.  
  452. ASKQUIT:
  453.     sz$ = UIStartDlg(CUIDLL$, DLG_ASKQUIT, "FQuitDlgProc", 0, "")
  454.  
  455.     IF sz$ = "EXIT" THEN
  456.         UIPopAll
  457.         ERROR STFQUIT
  458.     ELSEIF sz$ = "REACTIVATE" THEN
  459.         GOTO ASKQUIT
  460.     ELSE
  461.         UIPop 1
  462.     END IF
  463.     RETURN
  464.  
  465. '**
  466. '** Purpose:
  467. '**     Builds the copy list and performs all installation operations.
  468. '** Arguments:
  469. '**     none.
  470. '** Returns:
  471. '**     none.
  472. '*************************************************************************
  473. SUB Install STATIC
  474.  
  475.     CreateDir DEST$, cmoNone
  476.  
  477.     OpenLogFile MakePath("LOGFILE.OUT"), 0
  478.     WriteToLogFile ""
  479.     WriteToLogFile "  Destination directory: '" + DEST$ + "'"
  480.     WriteToLogFile ""
  481.  
  482.     ini$ = GetWindowsDir() + FILE_INI
  483.  
  484.     hPrev% = ShowWaitCursor()
  485.  
  486.     '' SetAppSpecificIni stuff sets up source .USR files section in .INI
  487.     '' file.  Will need InstallPath available to clobber any old .USR's
  488.     '' from previous versions.
  489.     SetSymbolValue "InstallPath", DEST$
  490.  
  491. '' make app-specific parameters section with special cases we know about
  492.     sec$ = "App-Specific Parameters"
  493.     rc% = SetAppSpecificIniStuff ( ini$, sec$, SrcPath$ )
  494.     if rc% < 0 then
  495.     ERROR STFERR
  496.     end if
  497.  
  498.     '' copy README.WRI manually.  It is not compressed and is often updated
  499.     '' AFTER the DDWIN.INF is built, so the file size is incorrect.
  500.     CopyFile SrcPath$+READ_ME, MakePath( READ_ME ), cmoOverwrite, 0
  501.  
  502.     '' do the real install - MUST happen AFTER SetAppSpecificIniStuff
  503.     '' We restore normal cursor, since we have a dialog up that user can
  504.     ''   press 'Cancel' on.
  505.     RestoreCursor hPrev%
  506.     CopyFilesInCopyList
  507.     hPrev% = ShowWaitCursor()
  508.  
  509.     WriteToLogFile "Finished CopyList"
  510.  
  511. '' this will alter VoiceBar.exe with user name and organization
  512.    SetSymbolValue "KeyFileName", MakePath(FILE_TOOLBAR)
  513.    i% = DlgSetUserOrg()
  514.  
  515.     sec$ = "Defaults"
  516.     CreateIniKeyValue ini$, sec$, "Main Directory", DEST$, cmoOverwrite
  517.  
  518.     sec$ = "System's Word Vocabularies"
  519.     CreateIniKeyValue ini$, sec$, "Dictation1", MakePath("prndict1.voc"), cmoOverwrite
  520.     CreateIniKeyValue ini$, sec$, "Dictation2", MakePath("prndict2.voc"), cmoOverwrite
  521.     CreateIniKeyValue ini$, sec$, "Tracking", MakePath("prnbuild.voc"), cmoOverwrite
  522.  
  523.     sec$ = "System's Shared Vocabularies"
  524.     CreateIniKeyValue ini$, sec$, "Tracking", MakePath("Tracking.voc"), cmoOverwrite
  525.  
  526.     '' add DragDev parameters
  527.     sec$ = "DSP"
  528.     CreateIniKeyValue ini$, sec$, "Path", DEST$, cmoOverwrite
  529.     '' board address is NOT overwritten
  530.     CreateIniKeyValue ini$, sec$, "IOADDRESS", "0x310", cmoNone
  531.     CreateIniKeyValue ini$, sec$, "INTERRUPT", "3", cmoNone
  532.     '' DSP vs Multimedia access is NOT overwritten
  533.     '' For future reference, possible values are
  534.     ''    MMLevel - use multimedia only
  535.     ''    DSPLevel - use DSP only
  536.     ''    Ignore - multimedia, except if ACPA which uses DSP
  537.     ''    BestTry - DragDev figures it out - this was an internal hack
  538.     ''        that is NOT recommended, since DragDev does I/O to ACPA ports
  539.     ''        to test for its presence
  540.     CreateIniKeyValue ini$, sec$, "Interface", "MMLevel", cmoNone
  541.  
  542.     UIPop 1
  543.  
  544.     CreateProgmanGroup ProgmanTitle$, "", cmoNone
  545.     ShowProgmanGroup  ProgmanTitle$, 1, cmoNone
  546.     SetProgmanGroupStuff ProgmanTitle$
  547.  
  548.     CloseLogFile
  549.     '* remove log when successful
  550.     RemoveFile MakePath("LOGFILE.OUT"), cmoNone
  551.     RestoreCursor hPrev%
  552.  
  553. END SUB
  554.  
  555. '**
  556. '** Purpose:
  557. '**     Appends a file name to the end of a directory path,
  558. '**     inserting a backslash character as needed.
  559. '** Arguments:
  560. '**     szFile$ - filename to append to directory
  561. '** Returns:
  562. '**     Resulting fully qualified path name.
  563. '*************************************************************************
  564. FUNCTION MakePath (szFile$) STATIC AS STRING
  565.     IF DEST$ = "" THEN
  566.         MakePath = szFile$
  567.     ELSEIF szFile$ = "" THEN
  568.         MakePath = DEST$
  569.     ELSEIF MID$(DEST$, LEN(DEST$), 1) = "\" THEN
  570.         MakePath = DEST$ + szFile$
  571.     ELSE
  572.         MakePath = DEST$ + "\" + szFile$
  573.     END IF
  574. END FUNCTION
  575.