Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AutoRegistration of DLL's and OCX's - VERY URGENT 1

Status
Not open for further replies.

engineer2100

Programmer
Feb 7, 2002
285
US
Greetings all,

I have an application that needs to be deployed on Citrix. Not the issue is that I cannot use the Package and deployment wizard to setup the application on the citrix. I have to copy the exe along with other important files onto the citrix box.

Is there anyway we can see, whenever the application is run, if the DLL's and OCX's are registered and if they are not then register them first and then continue execution? What I want is a way, from within the VB code, to auto register the DLL and OCX without manually doing the registration process.

I am in bit of a hurry here, so request you to help me with this asap.

Thanks
-Engi
 
This may not be very tidy, but should work.

Create a separate app that late binds all your DLLs. If the CreateObject fails then you need to register the DLL.

e.g.

dim myObject as object

on error resume next
set myObject = createObject("objTest.clsTest")
if err <> 0 then
'register dll
end if

and go on.

Hope this helps.

Hammy.
 
thanks Hammy. I found out another way using API call
- VerFindFile & VerInstallFile functions.

Code:
Public Declare Function VerFindFile Lib "version.dll" Alias "VerFindFileA" (ByVal uFlags As Long, ByVal szFileName As String, ByVal szWinDir As String, ByVal szAppDir As String, ByVal szCurDir As String, ByRef lpuCurDirLen As Long, ByVal szDestDir As String, ByRef lpuDestDirLen As Long) As Long

Public Declare Function VerInstallFile Lib "version.dll" Alias "VerInstallFileA" (ByVal uFlags As Long, ByVal szSrcFileName As String, ByVal szDestFileName As String, ByVal szSrcDir As String, ByVal szDestDir As String, ByVal szCurDir As String, ByVal szTmpFile As String, ByRef lpuTmpFileLen As Long) As Long

HTH you too.

Regards
Engi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top