home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
alwil
/
AVAST
/
CZE
/
AVAST.MS_
/
AVAST.bin
Wrap
Text File
|
1997-08-25
|
18KB
|
661 lines
'**************************************************************************
'* AVAST! Install (c) 1995 Jindrich Kubec, Alwil Software *
'**************************************************************************
''$DEFINE DEBUG ''Define for script development/debugging
''$DEFINE ENGLISH
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
''Dialog ID's
CONST WELCOME = 100
CONST ASKQUIT = 200
CONST DESTPATH = 300
CONST IEXITFAILURE = 400
CONST IEXITQUIT = 600
CONST IEXITSUCCESS = 700
CONST APPHELP = 900
CONST DEINSTME = 1000
CONST DEINSTDIFF = 1100
CONST REMOVABLEDISK = 1200
CONST DEXITFAILURE = 1300
CONST DEXITQUIT = 1400
CONST DEXITSUCCESS = 1500
CONST NOTPROGMAN = 1600
CONST BADPATH = 6400
CONST STF_ERROR_EXIT = 2000
CONST AWL_Install = 0
CONST AWL_Delete = 1
''Bitmap ID
CONST LOGO = 1
GLOBAL DEST$ ''Default destination directory.
GLOBAL CUIDLL$
GLOBAL WinDir$
GLOBAL HELPPROC$
GLOBAL instalace%
GLOBAL SYSTEMDIR$
GLOBAL shl%
DECLARE SUB Bad_path
DECLARE SUB NeedFileDialog(fname$)
DECLARE SUB Install
DECLARE FUNCTION NeedFile (fname$, action%) AS INTEGER
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION FindGroup LIB "mscuistf.dll" (szDir$, szGroup$) AS INTEGER
DECLARE FUNCTION IsDevice LIB "mscuistf.dll" (szDir$, szDevice$) AS INTEGER
DECLARE FUNCTION DeleteDevice LIB "mscuistf.dll" (szDir$, szDevice$) AS INTEGER
DECLARE FUNCTION RemoveProgManItem LIB "mscuistf.dll" (szItem$) AS INTEGER
DECLARE FUNCTION RemoveProgManGroup LIB "mscuistf.dll" (szGroup$) AS INTEGER
DECLARE FUNCTION IsPMShell LIB "mscuistf.dll" (szPath$) AS INTEGER
DECLARE FUNCTION AWLangCall LIB "mscuistf.dll" (inst%) AS INTEGER
INIT:
CUIDLL$ = "mscuistf.dll" ''Custom user interface dll
HELPPROC$ = "FHelpDlgProc" ''Help dialog procedure
DEST$ = GetSymbolValue("STF_SRCDIR")
SYSTEMDIR$ = MakePath(GetWindowsDir(), "SYSTEM.INI")
OpenLogFile MakePath(DEST$, "INSTALL.REP"), 1
instalace% = 1
EXITFAILURE =IEXITFAILURE
EXITQUIT =IEXITQUIT
EXITSUCCESS =IEXITSUCCESS
SetBitmap CUIDLL$, LOGO
'$IFDEF ENGLISH
SetTitle "Avast! Install"
'$ELSE
SetTitle "Avast! Instalace"
'$ENDIF
'$IFNDEF ENGLISH
vysl% = AWLangCall(AWL_Install)
WriteToLogFile("AWL_Install"+str$(vysl%))
'$ENDIF
if IsDriveRemovable(DEST$) = 1 then
sz$ = UIStartDlg(CUIDLL$, REMOVABLEDISK, "FInfoDlgProc", APPHELP, HELPPROC$)
'$IFDEF ENGLISH
WriteToLogFile("Drive is removable")
'$ELSE
WriteToLogFile("Disk je vymenny")
'$ENDIF
UiPop 1
ERROR STF_ERROR_EXIT
else
'$IFDEF ENGLISH
WriteToLogFile("Drive is non-removable")
'$ELSE
WriteToLogFile("Disk neni vymenny")
'$ENDIF
end if
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szInf$ = GetSymbolValue("STF_CWDDIR") + "AVAST.INF"
END IF
ReadInfFile szInf$
'$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
shl% = IsPMShell ( SYSTEMDIR$ )
if shl% = 0 then
'$IFDEF ENGLISH
WriteToLogFile("Shell is ProgMan")
'$ELSE
WriteToLogFile("Shell je ProgMan")
'$ENDIF
else
'$IFDEF ENGLISH
WriteToLogFile("Shell is not ProgMan")
'$ELSE
WriteToLogFile("Shell je kdovico")
'$ENDIF
sz$ = UIStartDlg(CUIDLL$, NOTPROGMAN, "FInfoDlgProc", APPHELP, HELPPROC$)
UIPop 1
end if
oldava% = IsDevice( SYSTEMDIR$, "awanti.386")
isinst% = DoesIniKeyExist("WIN.INI", "AVAST!", "Install")
cverze$ = GetIniKeyString("WIN.INI", "AVAST!", "Install")
cverze$ = mid$(cverze$,1,4)
if (cverze = "1904") then
'$IFDEF ENGLISH
WriteToLogFile("VERSION: 7.70!")
'$ELSE
WriteToLogFile("VERZE: 7.70!")
'$ENDIF
DEINSTME:
instalace% = 0
EXITFAILURE =DEXITFAILURE
EXITQUIT =DEXITQUIT
EXITSUCCESS =DEXITSUCCESS
'$IFDEF ENGLISH
SetTitle "Avast! Deinstall"
'$ELSE
SetTitle "Avast! Deinstalace"
'$ENDIF
sz$ = UIStartDlg(CUIDLL$, DEINSTME, "FInfoDlgProc", APPHELP, HELPPROC$)
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSE
GOSUB ASKQUIT
GOTO DEINSTME
END IF
'$IFDEF ENGLISH
WriteToLogFile("*** DEINSTALLATION of current version ***")
'$ELSE
WriteToLogFile("*** DEINSTALACE stavajici verze ***")
'$ENDIF
if shl% = 0 then
a = RemoveProgManGroup("AVAST!")
WritetoLogFile("AVAST! Group Remove Status:"+str$(a))
PROGMAN$ = MakePath (GetWindowsDir(), "PROGMAN.INI")
StartGroup$=STRING$(513,"-")
a = FindGroup(PROGMAN$, StartGroup$)
if a = 1 then
ShowProgManGroup StartGroup$, 1, cmoNone
a = RemoveProgManItem("FGW")
WriteToLogFile ("FGW Remove status:"+str$(a))
a = RemoveProgManItem("SGW")
WriteToLogFile ("SGW Remove status:"+str$(a))
ShowProgManGroup StartGroup$, 2, cmoNone
end if
end if
if oldava% = 1 then
'$IFDEF ENGLISH
WriteToLogFile("DEVICE= exists")
'$ELSE
WriteToLogFile("DEVICE= existuje")
'$ENDIF
aa% = DeleteDevice ( SYSTEMDIR$, "awanti.386")
if aa% = 1 then
'$IFDEF ENGLISH
WriteToLogFile("DEVICE= deleted")
'$ELSE
WriteToLogFile("DEVICE= smazano")
'$ENDIF
else
'$IFDEF ENGLISH
WriteToLogFile("DEVICE= not deleted")
'$ELSE
WriteToLogFile("DEVICE= nesmazano")
'$ENDIF
end if
end if
RemoveIniKey "WIN.INI", "Sounds", "AvastBadChecksum", cmoNone
RemoveIniKey "WIN.INI", "Sounds", "AvastFirstVirus", cmoNone
RemoveIniSection SYSTEMDIR$, "AWANTI", cmoNone
pmm$ = GetIniKeyString("WIN.INI", "AVAST!", "paging")
if pmm$ <> "" then
CreateIniKeyValue SYSTEMDIR$, "386enh", "paging", pmm$, cmoOverwrite
end if
pmm$ = GetIniKeyString("WIN.INI", "AVAST!", "TimerCriticalSection")
if pmm$ <> "" then
CreateIniKeyValue SYSTEMDIR$, "386enh", "TimerCriticalSection", pmm$, cmoOverwrite
end if
RemoveIniSection "WIN.INI", "Avast!", cmoNone
'$IFDEF ENGLISH
WriteToLogFile("*** Fishished - uninstalled ***")
'$ELSE
WriteToLogFile("*** Konec - Odinstalovano ***")
'$ENDIF
GOTO QUIT
elseif (isinst = 1) OR (oldava% = 1) then
'$IFDEF ENGLISH
WriteToLogFile("VERSION: Older than 7.70!!!")
'$ELSE
WriteToLogFile("VERZE: Starsi nez 7.70!!!")
'$ENDIF
DEINSTDIFF:
sz$ = UIStartDlg(CUIDLL$, DEINSTDIFF, "FInfoDlgProc", APPHELP, HELPPROC$)
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSE
GOSUB ASKQUIT
GOTO DEINSTDIFF
END IF
'$IFDEF ENGLISH
WriteToLogFile("*** UPGRADING older version***")
'$ELSE
WriteToLogFile("*** PREINSTALACE starsi verze ***")
'$ENDIF
if oldava% = 1 then
'$IFDEF ENGLISH
WriteToLogFile("DEVICE= exists")
'$ELSE
WriteToLogFile("DEVICE= existuje")
'$ENDIF
aaa% = DeleteDevice ( SYSTEMDIR$, "awanti.386")
if aaa% = 1 then
'$IFDEF ENGLISH
WriteToLogFile("DEVICE= deleted")
'$ELSE
WriteToLogFile("DEVICE= smazano")
'$ENDIF
else
'$IFDEF ENGLISH
WriteToLogFile("DEVICE= not deleted")
'$ELSE
WriteToLogFile("DEVICE= nesmazano")
'$ENDIF
end if
end if
if shl% = 0 then
a = FRemoveProgManGroup("AVAST!", cmoNone)
WritetoLogFile("AVAST! Group Remove Status:"+str$(a))
PROGMAN$ = MakePath (GetWindowsDir(), "PROGMAN.INI")
StartGroup$=STRING$(513,"-")
a = FindGroup(PROGMAN$, StartGroup$)
if a = 1 then
ShowProgManGroup StartGroup$, 1, cmoNone
a = RemoveProgManItem("FGW")
WriteToLogFile ("FGW Remove status:"+str$(a))
a = RemoveProgManItem("SGW")
WriteToLogFile ("SGW Remove status:"+str$(a))
ShowProgManGroup StartGroup$, 2, cmoNone
end if
end if
'$IFDEF ENGLISH
WriteToLogFile("*** Now - the installation ***")
'$ELSE
WriteToLogFile("*** Nasleduje instalace ***")
'$ENDIF
end if
WELCOME:
sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$)
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSE
GOSUB ASKQUIT
GOTO WELCOME
END IF
GETPATH:
SetSymbolValue "EditTextIn", DEST$
SetSymbolValue "EditFocus", "END"
GETPATHL1:
sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", APPHELP, HELPPROC$)
DEST$ = GetSymbolValue("EditTextOut")
IF sz$ = "CONTINUE" THEN
IF IsDirWritable(DEST$) = 0 THEN
Bad_path
GOTO GETPATHL1
END IF
IF DoesDirExist(DEST$) = 0 THEN
Bad_path
GOTO GETPATHL1
END IF
UIPop 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO GETPATHL1
ELSEIF sz$ = "BACK" THEN
UIPop 1
GOTO WELCOME
ELSE
GOSUB ASKQUIT
GOTO GETPATH
END IF
CloseLogFile
OpenLogFile MakePath(DEST$, "INSTALL.REP"), 1
Install
QUIT:
ON ERROR GOTO ERRQUIT
IF ERR = 0 THEN
dlg% = EXITSUCCESS
'$IFDEF ENGLISH
WriteToLogFile "*** Install succesful."
'$ELSE
WriteToLogFile "*** Install probehl OK."
'$ENDIF
ELSEIF ERR = STFQUIT THEN
dlg% = EXITQUIT
'$IFDEF ENGLISH
WriteToLogFile "*** Install terminated by user."
'$ELSE
WriteToLogFile "*** Install prerusen uzivatelem."
'$ENDIF
ELSE
dlg% = EXITFAILURE
'$IFDEF ENGLISH
WriteToLogFile "*** Install failed."
'$ELSE
WriteToLogFile "*** Install ukoncen chybou..."
'$ENDIF
END IF
QUITL1:
sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO QUITL1
END IF
UIPop 1
'$IFNDEF ENGLISH
vysl% = AWLangCall(AWL_Delete)
WriteToLogFile("AWL_Delete"+str$(vysl%))
'$ENDIF
WriteToLogFile ""
CloseLogFile
END
ERRQUIT:
'$IFDEF ENGLISH
i% = DoMsgBox("Setup sources were corrupted, call (+42-2)6855961!", "Setup Message", MB_OK+MB_TASKMODAL+MB_ICONHAND)
'$ELSE
i% = DoMsgBox("Kdo vi, co se stalo? (+42-2)6855961!", "Divna chyba!!!", MB_OK+MB_TASKMODAL+MB_ICONHAND)
'$ENDIF
'$IFDEF ENGLISH
WriteToLogFile "*** Install collapsed ***"
'$ELSE
WriteToLogFile "*** Install zkolaboval ***"
'$ENDIF
'$IFNDEF ENGLISH
vysl% = AWLangCall(AWL_Delete)
WriteToLogFile("AWL_Delete"+str$(vysl%))
'$ENDIF
WriteToLogFile ""
CloseLogFile
END
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
SUB Bad_path STATIC
BP1:
sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO BP1
END IF
UIPop 1
END SUB
SUB NeedFileDialog (fname$) STATIC
NF1:
'$IFDEF ENGLISH
i% = DoMsgBox("File "+fname$+" not found!!!", "Missing file!", MB_OK+MB_TASKMODAL+MB_ICONHAND)
'$ELSE
i% = DoMsgBox("Soubor "+fname$+" nenalezen!!!", "Chybi soubor!", MB_OK+MB_TASKMODAL+MB_ICONHAND)
'$ENDIF
END SUB
FUNCTION NeedFile (fname$, action%) STATIC AS INTEGER
FullPath$ = MakePath(DEST$, fname$)
Pom% = DoesFileExist(FullPath$, femExists)
NeedFile = Pom%
IF Pom% = 0 THEN
'$IFDEF ENGLISH
WriteToLogFile "File " + FullPath$ + " not found."
'$ELSE
WriteToLogFile "Soubor " + FullPath$ + " nenalezen."
'$ENDIF
IF ACTION = 0 THEN
NeedFileDialog(FullPath$)
UIPopAll
ERROR STF_ERROR_EXIT
END IF
GOTO NFKonec
END IF
Vers$ = GetVersionOfFile(FullPath$)
IF LEN(Vers$) <>0 THEN
'$IFDEF ENGLISH
WriteToLogFile "Version of file " + FullPath$ + " is " + Vers$
'$ELSE
WriteToLogFile "Verze souboru " + FullPath$ + " je " + Vers$
'$ENDIF
END IF
NFKonec:
END FUNCTION
'**
'** Purpose:
'** Builds the copy list and performs all installation operations.
'** Arguments:
'** none.
'** Returns:
'** none.
'*************************************************************************
SUB Install STATIC
'$IFDEF ENGLISH
WriteToLogFile "AVAST! install LOG file"
WriteToLogFile ""
WriteToLogFile "Processor type :"+STR$(GetProcessorType())+"86"
WriteToLogFile "DOS version :"+STR$(GetDOSMajorVersion())+"."+LTRIM$(STR$(GetDOSMinorVersion()))
WriteToLogFile "WINDOWS version :"+STR$(GetWindowsMajorVersion())+"."+LTRIM$(STR$(GetWindowsMinorVersion()))
WriteToLogFile "Windows mode :"+STR$(GetWindowsMode())
WriteToLogFile "Windows shared :"+STR$(IsWindowsShared())
WriteToLogFile "SMARTdrv size :"+STR$(GetConfigSmartdrvSize())
WriteToLogFile ""
WriteToLogFile "User chose directory: '" + DEST$ + "'"
WriteToLogFile ""
WriteToLogFile "Windows directory "+WinDir$
'$ELSE
WriteToLogFile "LOG soubor instalacniho programu pro AVAST!"
WriteToLogFile ""
WriteToLogFile "V pripade spatne instalace si prectete obsah"
WriteToLogFile "tohoto souboru. Pokud hodlate kontaktovat technickou"
WriteToLogFile "podporu, pripravte si vytisk tohoto souboru kvuli"
WriteToLogFile "urychleni nasi prace."
WriteToLogFile ""
WriteToLogFile "Typ procesoru :"+STR$(GetProcessorType())+"86"
WriteToLogFile "Verze DOSu :"+STR$(GetDOSMajorVersion())+"."+LTRIM$(STR$(GetDOSMinorVersion()))
WriteToLogFile "Verze WINDOWS :"+STR$(GetWindowsMajorVersion())+"."+LTRIM$(STR$(GetWindowsMinorVersion()))
WriteToLogFile "Mod Windows :"+STR$(GetWindowsMode())
WriteToLogFile "Sdileni Windows :"+STR$(IsWindowsShared())
WriteToLogFile "Velikost SMARTdrv:"+STR$(GetConfigSmartdrvSize())
WriteToLogFile ""
WriteToLogFile "Uzivatel zvolil adresar: '" + DEST$ + "'"
WriteToLogFile ""
WriteToLogFile "Windows adresar je "+WinDir$
'$ENDIF
Pom% = NeedFile ("AW3D.DLL", 0)
Pom% = NeedFile ("AWANTI.DLL",0)
Pom% = NeedFile ("AWGLOB.DLL",0)
'$IFNDEF ENGLISH
Pom% = NeedFile ("AWLANG.DLL",0)
'$ENDIF
Pom% = NeedFile ("FGWLIB.DLL",0)
Pom% = NeedFile ("FPTAB11.VBX",0)
Pom% = NeedFile ("LGUARD.VPS",0)
Pom% = NeedFile ("AVAST.386",0)
Pom% = NeedFile ("AWANTI.386",0)
AGW% = NeedFile ("AGW.EXE", 1)
FGW% = NeedFile ("FGW.EXE", 1)
LGW% = NeedFile ("LGW.EXE", 1)
SGW% = NeedFile ("SGW.EXE", 1)
SGWS%= NeedFile ("BADCHECK.WAV",1)
LGWS%= NeedFile ("FIRSTVIR.WAV",1)
pm$ = GetIniKeyString(SYSTEMDIR$, "386enh", "paging")
CreateIniKeyValue "WIN.INI", "AVAST!", "paging", pm$, cmoOverwrite
pm$ = GetIniKeyString(SYSTEMDIR$, "386enh", "TimerCriticalSection")
CreateIniKeyValue "WIN.INI", "AVAST!", "TimerCriticalSection", pm$, cmoOverwrite
CreateSysIniKeyValue SYSTEMDIR$, "386enh", "device", MakePath(DEST$,"awanti.386")+" ;AVAST! install", cmoOverwrite
CreateIniKeyValue SYSTEMDIR$, "386enh", "paging", "1 ;AVAST! install", cmoOverwrite
CreateIniKeyValue SYSTEMDIR$, "386enh", "TimerCriticalSection", "0 ;AVAST! install", cmoOverwrite
CreateIniKeyValue SYSTEMDIR$, "AWANTI", "DEF", " ;AVAST! install", cmoOverwrite
CreateIniKeyValue SYSTEMDIR$, "AWANTI", "CONCURENT", "7 ;AVAST! install", cmoOverwrite
CreateIniKeyValue SYSTEMDIR$, "AWANTI", "VPS", MakePath(DEST$,"LGUARD.VPS ;AVAST! install"), cmoOverwrite
CreateIniKeyValue SYSTEMDIR$, "AWANTI", "INI", MakePath(DEST$,"AVAST!.INI ;AVAST! install"), cmoOverwrite
CreateIniKeyValue "WIN.INI", "AVAST!", "Install", "1904", cmoOverwrite
SoundPath$="<none>"
IF SGWS% = 1 THEN
SoundPath$=MakePath(DEST$,"BADCHECK.WAV")
END IF
CreateIniKeyValue "WIN.INI", "Sounds", "AvastBadChecksum", SoundPath$+",AVAST:Bad Checksum ;AVAST! install", cmoOverwrite
SoundPath$="<none>"
IF LGWS% = 1 THEN
SoundPath$=MakePath(DEST$,"FIRSTVIR.WAV")
END IF
CreateIniKeyValue "WIN.INI", "Sounds", "AvastFirstVirus", SoundPath$+",AVAST:First Virus Found ;AVAST! install", cmoOverwrite
if shl% = 0 then
CreateProgmanGroup "AVAST!", "", cmoNone
ShowProgmanGroup "AVAST!", 1, cmoNone
IF AGW% = 1 THEN
CreateProgmanItem "AVAST!", "AGW", MakePath(DEST$,"AGW.EXE"), "", cmoOverwrite
END IF
IF FGW% = 1 THEN
CreateProgmanItem "AVAST!", "FGW", MakePath(DEST$,"FGW.EXE"), ",4", cmoOverwrite
END IF
IF LGW% = 1 THEN
CreateProgmanItem "AVAST!", "LGW", MakePath(DEST$,"LGW.EXE"), "", cmoOverwrite
END IF
IF SGW% = 1 THEN
CreateProgmanItem "AVAST!", "SGW", MakePath(DEST$,"SGW.EXE"), "", cmoOverwrite
END IF
CreateProgmanItem "AVAST!", "Deinstall", MakePath(DEST$,"SETUP.EXE"), "", cmoOverwrite
ShowProgmanGroup "AVAST!", 2, cmoNone
PROGMAN$ = MakePath (GetWindowsDir(), "PROGMAN.INI")
StartGroup$=STRING$(513,"-")
a = FindGroup(PROGMAN$, StartGroup$)
if a = 1 then
ShowProgmanGroup StartGroup$, 1, cmoNone
IF FGW% = 1 THEN
CreateProgmanItem StartGroup$, "FGW", MakePath(DEST$,"FGW.EXE"), ",4", cmoOverwrite
END IF
IF SGW% = 1 THEN
CreateProgmanItem StartGroup$, "SGW", MakePath(DEST$,"SGW.EXE"), " , , , , , ,1", cmoOverwrite
END IF
ShowProgmanGroup StartGroup$, 2, cmoNone
end if
end if
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