Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Our Crystal Runtime Solution -Very Long Post
Message
De
15/08/2000 12:39:11
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00404613
Message ID:
00405053
Vues:
33
><< I have a routine in VFP that installs the needed CR runtime files. A DBF determines the name of the DLL, where it needs to be installed, and if it needs to be registered. When the user attempts to run a report, the routine checks that all the DLLs are properly installed. It takes only a few seconds to check and about a minute to do the install. >>
>
>Craig,
>
>How can I get a copy of the routine?
>
>Greg


LOCAL lcSourceDir, lcTargetDir, lcFile, llCopyFile


SET TALK OFF
SET SAFETY OFF
SET DELETED ON
ON ERROR *

lcSourceDir = "\Installs\CR7Rt\"

CLOSE DATA ALL
USE (lcSourceDir + "Install") IN 0 SHARED NOUPDATE

SCAN
llCopyFile = .F.

* Check if the file exists. Only install new version if does not exist
* or existing version is older than source version
lcTargetDir = "C:" + ALLTRIM(Install.Location)
lcFile = ALLTRIM(Install.FileName)

WAIT WINDOW NOWAIT ("Processing " + lcFile)

IF !DIRECTORY(lcTargetDir)
MD (lcTargetDir)
ENDIF

DO CASE
CASE !FILE(lcTargetDir + lcFile)
llCopyFile = .T.
CASE FDATE(lcTargetDir + lcFile, 1) < FDATE(lcSourceDir + lcFile, 1)
llCopyFile = .T.
ENDCASE

IF llCopyFile
COPY FILE (lcSourceDir + lcFile) TO (lcTargetDir + lcFile)
ENDIF

IF Install.Register
lcCommand = "RUN /N " + lcSourceDir + "REGSVR32 /s " + lcTargetDir + lcFile
&lcCommand.
ENDIF
ENDSCAN
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform