• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 893
  • Last Modified:

Installer needed for an Access application to register a dll and ocx during installation

Hi
I am building a Microsoft Access application using Access 2007 developer extensions and the Access Runtime.  So far, I've been using the Package Solution Wizard to create the installation files. Can this be used to register a dll or an ocx?
If so, what are the steps I would take to do it? (The instructions from the dll that needs to be registered are below)
If it can't do it, then do you have a recommendation from personal experience that can be used to register a dll automatically during the installation? (I've looked at Inno, but haven't been able to figure out how I would do it with this)
thanks
Paul

Here's the instruction from the dll:
If you have included a reference to QlmLicenseLib.dll in your VB6, unmanaged C++ or any other non .NET based application, your setup must perform the following operations:

32 bit applications

Generate a type library to be refrenced by your code
%windir%\Microsoft.NET\Framework\v2.0.50727\regasm.exe /tlb "<fullpath>\QlmLicenseLib.dll"

Register the QlmLicenseLib.dll as a COM object
%windir%\Microsoft.NET\Framework\v2.0.50727\regasm.exe /codebase "<fullpath>\QlmLicenseLib.dll"

64 bit applications
Generate a type library to be refrenced by your code
"%windir%\Microsoft.NET\Framework64\v2.0.50727\regasm.exe" /tlb "<fullpath>\QlmLicenseLib.dll"

Register the QlmLicenseLib.dll as a COM object
"%windir%\Microsoft.NET\Framework64\v2.0.50727\regasm.exe" /codebase "<fullpath>\QlmLicenseLib.dll"
0
LearningToProgram
Asked:
LearningToProgram
  • 3
  • 2
  • 2
1 Solution
 
Jim P.Commented:
I always used to have to put the mscal.ocx on the local machine and register it.

The way I've done it in the past is have the file in some folder that is accessible all over the network. Then I would copy it to the local machine and shell out to register it. Some Aircode below.
Public Function RegDll()
Dim LocalPath As String
Dim NetPath As String
Dim ShellStr As String

LocalPath = "C:\Windows\System32\MyFile.dll"
NetPath = "\\MyServer\MyPath\MyFile.dll"

If Len(Dir("C:\Windows\System32\MyFile.dll")) < 1 Then
    FileCopy NetPath, LocalPath
    ShellStr "regsvr32 /s " & LocalPath
    Shell ShellStr, vbHide
End If

End Function

Open in new window

0
 
LearningToProgramAuthor Commented:
This will be software that will be sold so the installer software will need to do all of this for the end user -- I won't be on site or have access to the end user's network. Would your solution work in this scenario? (How would I create a network share from the installation program?)
0
 
Jim P.Commented:
Does it bootstrap itself onto each machine or does it run install from a CD or what?

Anyway however they have get it, you can do a
net share

Open in new window

command from the first one and then store that path in the DB.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
If you're going to sell this, be aware that installing the Runtime on a machine that has a full version of Access can cause some very sticky issues, not the least of which is the Runtime "hijacking" the file extensions for all Access databases - so when your program runs, and launches the 2007 Runtime, and the user then tries to open their Access 2003 database, they suddenly find that it's opening in that 2007 Runtime - and you get a nasty little support call.

The only way to manage this professionally is to use SageKey (www.sagekey.com). Sagekey can build your installation (and include that .dll) so that your application launches with the correct version and then "cleans up" afterwards.

However, to answer your question, you can use most commercial installers to deploy .ocx and .dll files. Inno is a good one, and many Access apps are deployed with it. There's also free versions of Advanced Installer and InstallAware.
0
 
LearningToProgramAuthor Commented:
Thanks for the heads up on the Access Runtime.  So you would recommend SageKey over Installshield Express for an Access installation? I have no experience with either of them, but I  see that they're about the same price.
0
 
Jim P.Commented:
I'm going to support the LSM view.  Most of my stuff has always been internal stuff -- not sell and "walk away".

He's done a lot more of that than me.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
If you're going to work strictly with Access, then SageKey is definitely the better choice. It is designed to work with Access, which is managed differently from .NET or other languages, so you've got a head start right there.

Before purchasing, be sure that you've defined what you need your installer to do - for example, add your .ocx files - and then contact SageKey to insure the product does these things.

InstallShield Express is designed around .NET, Java, etc (in fact, a stripped down version "ships" with Visual Studio) - it won't handle Access and the Runtime as well as SageKey, and you'll find yourself doing a LOT more work on the install.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now