Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Urgent InstallShield Problem - Help!
Message
From
26/09/2002 15:27:24
 
General information
Forum:
Visual FoxPro
Category:
InstallShield
Miscellaneous
Thread ID:
00704870
Message ID:
00704916
Views:
17
Kevin:

I never did figure out how to register DLL's with IS (didn't really try). Instead I took ideas from others and did a little .prg that runs whenever my application starts. It checks to see if necessary DLL's, OCX's etc. are registered and if not registers them. The .prg uses the VFP registry class which you can find somewhere in the VFP directories (VFP7.0 in my case). Don't have much time to explain, gotta go to a meeting.

Scott


Hope the following helps:
PRIVATE goRegistryObject
LOCAL lcCompName, lcClass, lcFileType, llRetCode  
#INCLUDE registry.h
gnMsgBoxButtons_OK               = 0
gnMsgBoxButtons_OKCancel         = 1
gnMsgBoxButtons_AbortRetryIgnore = 2
gnMsgBoxButtons_AbortRetryCancel = 2
gnMsgBoxButtons_YesNoCancel      = 3
gnMsgBoxButtons_YesNo            = 4
gnMsgBoxButtons_RetryCancel      = 5
gnMsgBoxIcon_StopSign            = 16
gnMsgBoxIcon_Question            = 32
gnMsgBoxIcon_Exclamation         = 48
gnMsgBoxIcon_Information         = 64
gnMsgBoxReply_OK                 = 1
gnMsgBoxReply_CANCEL             = 2
gnMsgBoxReply_ABORT              = 3
gnMsgBoxReply_RETRY              = 4
gnMsgBoxReply_IGNORE             = 5
gnMsgBoxReply_YES                = 6
gnMsgBoxReply_NO                 = 7

goRegistryObject=NEWOBJECT( "registry", "registry.prg" )
IF VARTYPE( goRegistryObject ) <> "O"
    WAIT "ERROR: Unable to create registry object" WINDOW
    RETU
ENDIF    

IF ! IsRegistered( "commtools" + "." + "modem" )
    TryToRegister( "commtools", "modem", "OCX" )
ENDIF

IF ! IsRegistered( "ppcSettl" + "." + "Settlements" )
    TryToRegister( "ppcSettl", "Settlements", "DLL" )
ENDIF

IF ! IsRegistered( "ppcDialup" + "." + "DialupConnection" )
    TryToRegister( "ppcDialup", "DialupConnection", "DLL" )
ENDIF

IF ! IsRegistered( "ppcTcpIP" + "." + "TcpIPConnection" )
    TryToRegister( "ppcTcpIP", "TcpIPConnection", "DLL" )
ENDIF

IF ! IsRegistered( "ppcFTP" + "." + "FTPConnection" )
    TryToRegister( "ppcFTP", "FTPConnection", "DLL" )
ENDIF


RELEASE goRegistryObject 
RELEASE ALL  
RETURN

FUNCTION IsRegistered
   PARAMETERS pcComponentAndClassName
   LOCAL llRetVal
   llRetVal=.F.
   llRetVal=goRegistryObject.IsKey(pcComponentAndClassName,HKEY_CLASSES_ROOT)
RETURN( llRetVal )
*
FUNCTION TryToRegister
    LPARAMETERS pcComponentName, pcClassName, pcFileType
    LOCAL llRetCode, lcMsgBoxTitle, lcMsgBoxText
    llRetCode = RegisterComponent( pcComponentName + "." + pcFileType )
    llRetCode = goRegistryObject.IsKey( pcComponentName + "." + pcClassName, HKEY_CLASSES_ROOT)
    IF ! llRetCode
    *************************************************************************************
    **  You will have to substitute something different for the call the UDF "msgbox"  **
    *************************************************************************************
        MSGBOX( "Component not properly registered : " +pcComponentName + "." + pcFileType , "Initialization", gnMsgBoxButtons_OK + gnMsgBoxIcon_Exclamation )
    ENDIF
RETU( .T. )
*
FUNCTION RegisterComponent
    LPARAMETERS pcComponentAndFileType
    LOCAL lcPathAndName, lcDriveAndPath, llRetVal
    lcDriveAndPath = SYS(5) + SYS(2003) + "\" 
    lcPathAndName  = lcDriveAndPath + pcComponentAndFileType
    RUN /N REGSVR32 /S &lcPathAndName
RETURN( .T. ) 
Scott Ramey
BDS Software
Previous
Reply
Map
View

Click here to load this message in the networking platform