Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Our Crystal Runtime Solution -Very Long Post
Message
From
15/08/2000 12:39:11
 
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00404613
Message ID:
00405053
Views:
32
><< 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
Previous
Reply
Map
View

Click here to load this message in the networking platform