home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 September
/
Chip_2001-09_cd1.bin
/
tema
/
leda2
/
demo_acca.exe
/
DISK1
/
SETUP.MS_
/
SETUP.bin
Wrap
Text File
|
1998-08-18
|
22KB
|
692 lines
'**************************************************************************
'* MSSetup Toolkit Leda Instalation
'**************************************************************************
'$DEFINE VACCADEMO
'$DEFINE NODEBUG ''Define for script development/debugging
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
''Logic ID's
CONST TRUE = -1
CONST FALSE = 0
''Dialog ID's
CONST WELCOME = 100
CONST ASKQUIT = 200
CONST DESTPATH = 300
CONST EXITFAILURE = 400
CONST EXITQUIT = 600
CONST EXITSUCCESS = 700
CONST OPTIONS = 800
CONST APPHELP = 900
CONST MODELESS = 5000
CONST TOOBIG = 6300
CONST BADPATH = 6400
CONST CDCONFIRMINFO = 7300
CONST SRCDRV = 7802
CONST BADDRV = 7801
CONST OPTIONSCOPY = 7803
CONST OPTIONSNETWORK = 7804
CONST DESTPATHNETW = 7805
CONST OPTIONSCOPY1 = 7806
CONST OPTIONSWORD = 7814
CONST APPHELP3 = 7815
''Bitmap ID
CONST LOGO = 1
GLOBAL CUIDLL$
GLOBAL NETDSTP$
GLOBAL DSTPATH$ ''Default destination directory.
GLOBAL WINPATH$
GLOBAL SRCDRVR$
GLOBAL OPTVER$ ''Option selection from option dialog.
GLOBAL OPTCOPY$
GLOBAL OPTNETW$
GLOBAL EXEDIR$
GLOBAL REQDISC&
GLOBAL STRTDIR$
GLOBAL CDROM%
GLOBAL NETINST%
GLOBAL ININAME$
GLOBAL OPTWORD$
GLOBAL VERWORD70$
GLOBAL INSTDOC70$
GLOBAL INSTDOC97$
GLOBAL DCTNAME$
DECLARE SUB Install
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE SUB CopyFilesFromCD (szSrcDir$)
'$IFDEF VACCA
EXEDIR$ = "VACCA"
REQDISC& = 42000000
STRTDIR$ = "VACCA"
INSTDOC70$ = "INSTVACC.DOC"
INSTDOC97$ = "VACCA97.DOC"
DCTNAME$ = "Velk² A-╚/╚-A slovnφk"
'$ENDIF
'$IFDEF VAC
EXEDIR$ = "VAC"
REQDISC& = 26000000
STRTDIR$ = "VAC"
INSTDOC70$ = "INSTVAC.DOC"
INSTDOC97$ = "VAC97.DOC"
DCTNAME$ = "Velk² A-╚ slovnφk"
'$ENDIF
'$IFDEF MZD
EXEDIR$ = "MZD"
REQDISC& = 8500000
STRTDIR$ = "MZD"
INSTDOC70$ = "INSTMZD.DOC"
INSTDOC97$ = "MZD97.DOC"
DCTNAME$ = "A-╚/╚-A slovnφk zpracovßnφ dat, ..."
'$ENDIF
'$IFDEF CAF
EXEDIR$ = "CAF"
REQDISC& = 8000000
STRTDIR$ = "CAF"
INSTDOC70$ = "INSTCAF.DOC"
INSTDOC97$ = "CAF97.DOC"
DCTNAME$ = "╚-A slovnφk (Fronek)"
'$ENDIF
'$IFDEF ENC
EXEDIR$ = "ENC"
REQDISC& = 14000000
STRTDIR$ = "ENC"
DCTNAME$ = ""
'$ENDIF
'$IFDEF ACLAW
EXEDIR$ = "ACLAW"
REQDISC& = 3500000
STRTDIR$ = "LAW"
INSTDOC70$ = "INSTACLA.DOC"
INSTDOC97$ = "ACLAW97.DOC"
DCTNAME$ = "A-╚ prßvnick² slovnφk"
'$ENDIF
'$IFDEF ACEKO
EXEDIR$ = "ACEKO"
REQDISC& = 13000000
STRTDIR$ = "EKON"
INSTDOC70$ = "INSTECO.DOC"
INSTDOC97$ = "ACEKO97.DOC"
DCTNAME$ = "A-╚ ekonomick² slovnφk"
'$ENDIF
'$IFDEF ACLS
EXEDIR$ = "ACLS"
REQDISC& = 5000000
STRTDIR$ = "LS"
INSTDOC70$ = "INSTACLS.DOC"
INSTDOC97$ = "ACLS97.DOC"
DCTNAME$ = "A-╚ lΘka°sk² slovnφk"
'$ENDIF
'$IFDEF VACCADEMO
EXEDIR$ = "DEMO"
REQDISC& = 1200000
STRTDIR$ = "DEM"
INSTDOC70$ = "INSTDEMO.DOC"
INSTDOC97$ = "DEMO97.DOC"
DCTNAME$ = "DEMOVERZE Velk² A-╚ slovnφk"
'$ENDIF
'$IFDEF LEX
EXEDIR$ = "LEX"
REQDISC& = 7000000
STRTDIR$ = "LEX"
INSTDOC70$ = "INSTLEX.DOC"
INSTDOC97$ = "LEX97.DOC"
DCTNAME$ = "Lexicon Medicum"
'$ENDIF
'$IFDEF ACF
EXEDIR$ = "ACF"
REQDISC& = 7000000
STRTDIR$ = "ACF"
INSTDOC70$ = "INSTACF.DOC"
INSTDOC97$ = "ACF97.DOC"
DCTNAME$ = "A-╚ slovnφk (Fronek)"
'$ENDIF
'$IFDEF SSC
EXEDIR$ = "SSC"
REQDISC& = 30000000
STRTDIR$ = "SSC"
INSTDOC70$ = "INSTSSC.DOC"
INSTDOC97$ = "SSC97.DOC"
DCTNAME$ = "Slovnφk spisovnΘ ΦeÜtiny"
'$ENDIF
INIT:
CUIDLL$ = "mscuistf.dll" ''Custom user interface dll
HELPPROC$ = "FHelpDlgProc" ''Help dialog procedure
SetBitmap CUIDLL$, LOGO
SetTitle "Instalace LEDA"
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szInf$ = GetSymbolValue("STF_CWDDIR") + "SETUP.INF"
END IF
ReadInfFile szInf$
CDROM% = FALSE
NETINST% = FALSE
OPTVER$ = "1"
OPTCOPY$ = "1"
OPTNETW$ = "1"
OPTWORD$ = "1"
VERWORD70$ = "1"
DSTPATH$ = "C:\LEDA\" + EXEDIR
NETDSTP$ = "C:\LEDA\" + EXEDIR
SRCDRVR$ = "A:\"
WINPATH$ = GetWindowsDir
ININAME$ = EXEDIR$ + ".INI"
'$IFDEF DEBUG
i% = SetSizeCheckMode(scmOnIgnore) '' could use scmOff; def = scmOnFatal
WinDrive$ = MID$(GetWindowsDir, 1, 1)
IF IsDriveValid(WinDrive$) = 0 THEN
i% = DoMsgBox("Windows drive ('"+WinDrive$+"') is not a valid drive.", "DEBUG", MB_TASKMODAL+MB_ICONHAND+MB_OK)
GOTO QUIT
END IF
'$ENDIF ''DEBUG
'*************************************************************************
'uvod
'*************************************************************************
WELCOME:
sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$)
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSE
GOSUB ASKQUIT
GOTO WELCOME
END IF
'*************************************************************************
'uvod
'*************************************************************************
OPTION:
SetSymbolValue "RadioDefault", OPTVER$
OPTL1:
sz$ = UIStartDlg(CUIDLL$, OPTIONS, "FRadioDlgProc", APPHELP, HELPPROC$)
OPTVER$ = GetSymbolValue("ButtonChecked")
IF sz$ = "CONTINUE" THEN
UIPop(1)
ELSEIF sz$ = "REACTIVATE" THEN
GOTO OPTL1
ELSE
GOSUB ASKQUIT
GOTO OPTION
END IF
'*************************************************************************
'instalovat makro pro MS WORD if WINDOWS
'*************************************************************************
IF OPTVER$ = "1" THEN
OPTIONSWORD:
SetSymbolValue "RadioDefault", OPTWORD$
OPTWORD:
sz$ = UIStartDlg(CUIDLL$, OPTIONSWORD, "FRadioDlgProc", APPHELP3, HELPPROC$)
OPTWORD$ = GetSymbolValue("ButtonChecked")
IF sz$ = "CONTINUE" THEN
UIPop(1)
ELSEIF sz$ = "REACTIVATE" THEN
GOTO OPTWORD
ELSE
GOSUB ASKQUIT
GOTO OPTIONSWORD
END IF
END IF
'*************************************************************************
'zadat cilovy adresar
'*************************************************************************
GETPATH:
SetSymbolValue "EditTextIn", DSTPATH$
SetSymbolValue "EditFocus", "END"
GETPATHL1:
sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", APPHELP, HELPPROC$)
DSTPATH$ = GetSymbolValue("EditTextOut")
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO GETPATHL1
ELSEIF sz$ = "BACK" THEN
UIPop 1
GOTO OPTION
ELSE
GOSUB ASKQUIT
GOTO GETPATH
END IF
IF DoesDirExist(DSTPATH$) = 1 THEN
SetSymbolValue "ConfirmTextIn", DSTPATH$
sz$ = UIStartDlg(CUIDLL$, CDCONFIRMINFO, "FConfirmDlgProc", APPHELP, HELPPROC$)
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSE
UIPop 1
GOTO GETPATH
END IF
END IF
'*************************************************************************
'cilovy adresar je na siti
'*************************************************************************
IF IsDriveNetwork(Mid$(DSTPATH$,1,1)) = 1 THEN
NETINST% = TRUE
OPTIONNET:
SetSymbolValue "RadioDefault", OPTNETW$
OPTNETL1:
sz$ = UIStartDlg(CUIDLL$, OPTIONSNETWORK, "FRadioDlgProc", APPHELP, HELPPROC$)
OPTNETW$ = GetSymbolValue("ButtonChecked")
IF sz$ = "CONTINUE" THEN
IF VAL(OPTNETW$) < VAL("3") THEN
IF IsDirWritable(DSTPATH$) = 0 THEN
GOSUB BADPATH
GOTO GETPATHL1
END IF
ENDIF
UIPop(1)
ELSEIF sz$ = "REACTIVATE" THEN
GOTO OPTNETL1
ELSEIF sz$ = "BACK" THEN
UIPop 1
GOTO GETPATH
ELSE
GOSUB ASKQUIT
GOTO OPTIONNET
END IF
'*************************************************************************
'zadat cilovy adresar pracovni stanice
'*************************************************************************
IF VAL(OPTNETW$) > VAL("1") THEN
GETPATHNET:
SetSymbolValue "EditTextIn", NETDSTP$
SetSymbolValue "EditFocus", "END"
GETPATHNETL1:
sz$ = UIStartDlg(CUIDLL$, DESTPATHNETW, "FEditDlgProc", APPHELP, HELPPROC$)
NETDSTP$ = GetSymbolValue("EditTextOut")
IF sz$ = "CONTINUE" THEN
IF IsDirWritable(NETDSTP$) = 0 THEN
GOSUB BADPATH
GOTO GETPATHNETL1
END IF
UIPop 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO GETPATHNETL1
ELSEIF sz$ = "BACK" THEN
UIPop 1
GOTO OPTION
ELSE
GOSUB ASKQUIT
GOTO GETPATHNET
END IF
ENDIF
IF DoesDirExist(NETDSTP$) = 1 THEN
SetSymbolValue "ConfirmTextIn", NETDSTP$
sz$ = UIStartDlg(CUIDLL$, CDCONFIRMINFO, "FConfirmDlgProc", APPHELP, HELPPROC$)
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSE
UIPop 1
GOTO GETPATHNET
END IF
END IF
END IF
'*************************************************************************
'zadat zdrojovy drive pro databaze
'*************************************************************************
GETDRV:
SetSymbolValue "EditTextIn", SRCDRVR$
SetSymbolValue "EditFocus", "END"
GETDRVHL1:
sz$ = UIStartDlg(CUIDLL$, SRCDRV, "FEditDlgProc", APPHELP, HELPPROC$)
SRCDRVR$ = GetSymbolValue("EditTextOut")
IF sz$ = "CONTINUE" THEN
IF IsDriveValid(SRCDRVR$) = 0 THEN
GOSUB BADDRV
GOTO GETDRVHL1
END IF
UIPop 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO GETDRVHL1
ELSEIF sz$ = "BACK" THEN
UIPop 1
GOTO GETPATH
ELSE
GOSUB ASKQUIT
GOTO GETDRV
END IF
IF Asc(Mid$(SRCDRVR$,1,1)) > Asc("B") THEN
CDROM = TRUE
OPTIONCOPY:
SetSymbolValue "RadioDefault", OPTCOPY$
OPTCOPYL1:
IF NETINST% = TRUE THEN
sz$ = UIStartDlg(CUIDLL$, OPTIONSCOPY1, "FRadioDlgProc", APPHELP, HELPPROC$)
ELSE
sz$ = UIStartDlg(CUIDLL$, OPTIONSCOPY, "FRadioDlgProc", APPHELP, HELPPROC$)
ENDIF
OPTCOPY$ = GetSymbolValue("ButtonChecked")
IF sz$ = "CONTINUE" THEN
UIPop(1)
ELSEIF sz$ = "REACTIVATE" THEN
GOTO OPTCOPYL1
ELSEIF sz$ = "BACK" THEN
UIPop 1
GOTO GETDRV
ELSE
GOSUB ASKQUIT
GOTO OPTIONCOPY
END IF
END IF
IF OPTCOPY$ = "1" THEN
GETFREE:
IF GetFreeSpaceForDrive(Mid$(DSTPATH$,1,1)) < REQDISC& THEN
GOSUB TOOBIG
ERROR STFERR
GOTO QUIT
END IF
UIPop 1
ENDIF
'*************************************************************************
'instalace
'*************************************************************************
Install
QUIT:
ON ERROR GOTO ERRQUIT
IF ERR = 0 THEN
dlg% = EXITSUCCESS
ELSEIF ERR = STFQUIT THEN
dlg% = EXITQUIT
ELSE
dlg% = EXITFAILURE
END IF
QUITL1:
sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO QUITL1
END IF
UIPop 1
END
ERRQUIT:
i% = DoMsgBox("InstalΦnφ program je poruÜen, kontaktujte ....", "Setup Message", MB_OK+MB_TASKMODAL+MB_ICONHAND)
END
'*************************************************************************
'chybove stavy
'*************************************************************************
BADPATH:
sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO BADPATH
END IF
UIPop 1
RETURN
BADDRV:
sz$ = UIStartDlg(CUIDLL$, BADDRV, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO BADDRV
END IF
UIPop 1
RETURN
TOOBIG:
sz$ = UIStartDlg(CUIDLL$, TOOBIG, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO TOOBIG
END IF
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
'**
'** Purpose:
'** Builds the copy list and performs all installation operations.
'** Arguments:
'** none.
'** Returns:
'** none.
'*************************************************************************
SUB Install STATIC
SrcDir$ = GetSymbolValue("STF_SRCDIR")
CreateDir DSTPATH$, cmoNone
ExeName$ = EXEDIR$ + ".EXE"
HlpName$ = EXEDIR$ + ".HLP"
CdDir$ = MID$(SRCDRVR$,1,1) + ":\" + STRTDIR$
CdPath$ = ""
LogPath$ = ""
IF NETINST% = TRUE AND OPTNETW$ > "1" THEN
CreateDir NETDSTP$, cmoNone
LogPath$ = NETDSTP$
ELSE
LogPath$ = DSTPATH$
ENDIF
OpenLogFile MakePath(LogPath$, "LOGFILE.OUT"), 0
WriteToLogFile ""
WriteToLogFile " Destination directory: '" + DSTPATH$ + "'"
WriteToLogFile " Surce drive: '" + SRCDRVR$ + "'"
WriteToLogFile ""
IF OPTVER$ = "1" THEN 'WINDOWS Version
IF NETINST% = TRUE AND OPTNETW$ = "1" THEN 'pouze server
IF CDROM% = TRUE AND OPTCOPY$ = "1" THEN
CopyFilesFromCD(CdDir$)
ELSEIF CDROM% = FALSE THEN
AddSectionFilesToCopyList "RData", SrcDir$, DSTPATH$
CopyFilesInCopyList
ENDIF
AddSectionFilesToCopyList "WinExe", SrcDir$, DSTPATH$
CopyFilesInCopyList
ELSEIF NETINST% = TRUE AND OPTNETW$ = "2" THEN 'server i klient
IF CDROM% = TRUE AND OPTCOPY$ = "1" THEN
CopyFilesFromCD(CdDir$)
ELSEIF CDROM% = FALSE THEN
AddSectionFilesToCopyList "RData", SrcDir$, DSTPATH$
CopyFilesInCopyList
ENDIF
AddSectionFilesToCopyList "WinExe", SrcDir$, DSTPATH$
CopyFilesInCopyList
' AddSectionFilesToCopyList "WinHlp", SrcDir$, NETDSTP$
' AddSectionFilesToCopyList "RWData", SrcDir$, NETDSTP$
' CopyFilesInCopyList
AddSectionFilesToCopyList "IniFiles", SrcDir$, WINPATH$
CopyFilesInCopyList
IF CDROM% = TRUE AND OPTCOPY$ = "2" THEN
CdPath$ = CdDir$
ELSE
CdPath$ = DSTPATH$
ENDIF
CreateProgmanGroup EXEDIR$, "", cmoNone
ShowProgmanGroup EXEDIR$, 1, cmoNone
CreateProgmanItem EXEDIR$, EXEDIR$, MakePath(DSTPATH$,ExeName) + " " + CdPath$, ",,,," + NETDSTP$, cmoOverwrite
CreateProgmanItem EXEDIR$, "Help", MakePath(DSTPATH$,HlpName), "", cmoOverwrite
CreateProgmanItem EXEDIR$, "Logfile", "notepad.exe " + MakePath(NETDSTP$,"logfile.out"), "", cmoOverwrite
ELSEIF NETINST% = TRUE AND OPTNETW$ = "3" THEN 'pouze klient
AddSectionFilesToCopyList "IniFiles", SrcDir$, WINPATH$
CopyFilesInCopyList
IF CDROM% = TRUE AND OPTCOPY$ = "3" THEN
CdPath$ = CdDir$
ELSE
CdPath$ = DSTPATH$
ENDIF
CreateProgmanGroup EXEDIR$, "", cmoNone
ShowProgmanGroup EXEDIR$, 1, cmoNone
CreateProgmanItem EXEDIR$, EXEDIR$, MakePath(DSTPATH$,ExeName) + " " + CdPath$, ",,,," + NETDSTP$, cmoOverwrite
CreateProgmanItem EXEDIR$, "Help", MakePath(DSTPATH$,HlpName), "", cmoOverwrite
CreateProgmanItem EXEDIR$, "Logfile", "notepad.exe " + MakePath(NETDSTP$,"logfile.out"), "", cmoOverwrite
ELSE 'jednouziv.licence
IF CDROM% = TRUE AND OPTCOPY$ = "1" THEN
CopyFilesFromCD(CdDir$)
ELSEIF CDROM% = FALSE THEN
AddSectionFilesToCopyList "RData", SrcDir$, DSTPATH$
CopyFilesInCopyList
ENDIF
' AddSectionFilesToCopyList "WinHlp", SrcDir$, DSTPATH$
AddSectionFilesToCopyList "WinExe", SrcDir$, DSTPATH$
' AddSectionFilesToCopyList "RWData", SrcDir$, DSTPATH$
CopyFilesInCopyList
AddSectionFilesToCopyList "IniFiles", SrcDir$, WINPATH$
CopyFilesInCopyList
IF CDROM% = TRUE AND OPTCOPY$ = "2" THEN
CdPath$ = CdDir$
ENDIF
CreateProgmanGroup EXEDIR$, "", cmoNone
ShowProgmanGroup EXEDIR$, 1, cmoNone
CreateProgmanItem EXEDIR$, EXEDIR$, MakePath(DSTPATH$,ExeName) + " " + CdPath$, "", cmoOverwrite
CreateProgmanItem EXEDIR$, "Help", MakePath(DSTPATH$,HlpName), "", cmoOverwrite
CreateProgmanItem EXEDIR$, "Logfile", "notepad.exe " + MakePath(DSTPATH$,"logfile.out"), "", cmoOverwrite
ENDIF
ELSE 'instalace pro DOS
IF NETINST% = TRUE AND OPTNETW$ = "1" THEN 'pouze server
IF CDROM% = TRUE AND OPTCOPY$ = "1" THEN
CopyFilesFromCD(CdDir$)
ELSEIF CDROM% = FALSE THEN
AddSectionFilesToCopyList "RData", SrcDir$, DSTPATH$
CopyFilesInCopyList
ENDIF
AddSectionFilesToCopyList "DosExe", SrcDir$, DSTPATH$
CopyFilesInCopyList
ELSEIF NETINST% = TRUE AND OPTNETW$ = "2" THEN 'server i klient
IF CDROM% = TRUE AND OPTCOPY$ = "1" THEN
CopyFilesFromCD(CdDir$)
ELSEIF CDROM% = FALSE THEN
AddSectionFilesToCopyList "RData", SrcDir$, DSTPATH$
CopyFilesInCopyList
ENDIF
AddSectionFilesToCopyList "DosExe", SrcDir$, DSTPATH$
CopyFilesInCopyList
' AddSectionFilesToCopyList "RWData", SrcDir$, NETDSTP$
' CopyFilesInCopyList
ELSE 'jednouziv.licence
IF CDROM% = TRUE AND OPTCOPY$ = "1" THEN
CopyFilesFromCD(CdDir$)
ELSEIF CDROM% = FALSE THEN
AddSectionFilesToCopyList "RData", SrcDir$, DSTPATH$
CopyFilesInCopyList
ENDIF
AddSectionFilesToCopyList "DosExe", SrcDir$, DSTPATH$
' AddSectionFilesToCopyList "RWData", SrcDir$, DSTPATH$
CopyFilesInCopyList
ENDIF
ENDIF
ini$ = MakePath(WINPATH$, ININAME$)
CreateIniKeyValue ini$,"PATH","EXE_PATH", DSTPATH$, cmoOverwrite
IF CdPath$ = "" THEN
CreateIniKeyValue ini$,"PATH","DB_PATH", DSTPATH$, cmoOverwrite
ELSE
CreateIniKeyValue ini$,"PATH","DB_PATH", CdPath$, cmoOverwrite
END IF
IF OPTNETW$ = "1" THEN
CreateIniKeyValue ini$,"PATH","PRAC_PATH", DSTPATH$, cmoOverwrite
ELSE
CreateIniKeyValue ini$,"PATH","PRAC_PATH", NETDSTP$, cmoOverwrite
END IF
CreateIniKeyValue ini$,"PATH","NameEXE", DCTNAME$, cmoOverwrite
IF val(OPTWORD$) <> val("3") AND OPTVER$ = "1" THEN 'instalovat ,verze Windows
file_w$ = "winword.exe"
tree_w$ = "C:\"
wordpath$ = FindFileInTree(file_w$,tree_w$)
IF wordpath$ <> "" THEN
IF OPTWORD$ = "1" THEN
CmdRun$ = wordpath$ + " " + MakePath(DSTPATH$, INSTDOC70$)
ELSE
CmdRun$ = wordpath$ + " " + MakePath(DSTPATH$, INSTDOC97$)
END IF
Run CmdRun$
END IF
END IF
CloseLogFile
END SUB
'**
'** Purpose:
'** Appends a file name to the end of a directory path,
'** inserting a backslash character as needed.
'** Arguments:
'** szDir$ - full directory path (with optional ending "\")
'** szFile$ - filename to append to directory
'** Returns:
'** Resulting fully qualified path name.
'*************************************************************************
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
SUB CopyFilesFromCD (szSrcDir$) STATIC
sz$ = UIStartDlg(CUIDLL$, MODELESS, "FModelessDlgProc", APPHELP, HELPPROC$)
cursor% = ShowWaitCursor()
CopyFile MakePath(szSrcDir$,"LEDA_MI.DO1"),MakePath(DSTPATH$,"LEDA_MI.DO1"),cmoOverwrite, FALSE
CopyFile MakePath(szSrcDir$,"LEDA_MI.DD1"),MakePath(DSTPATH$,"LEDA_MI.DD1"),cmoOverwrite, FALSE
CopyFile MakePath(szSrcDir$,"LEDA_MI.DCT"),MakePath(DSTPATH$,"LEDA_MI.DCT"),cmoOverwrite, FALSE
RestoreCursor cursor
UIPop 1
END SUB