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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM Free Registration

Status
Not open for further replies.

webuser

MIS
Jun 1, 2001
202
US
First some background:

In classic VB and VB.Net on Windows XP and higher machines, there is a way of avoiding having to use the registry for COM Components. Called Registration Free COM, all that is required is a manifest file for the application to be in the same folder as your applcation or DLL. This file is read by the application BEFORE it looks in the registry and uses the information in there to work with the COM components - so that you can essentially do XCopy deployment - the manifest replaces the registry!

And now my question: Has anyone done anything like this in MS Access or heard of anyone doing it? Access is COM based so I would think it could work, but in the regular VB version,the application looks for a file with the same name as the app but with a .Manifest extension. I have a feeling this wouldn't work with Access like using a file called MyAccess.mdb.manifest...

I know this is a tough one, but if anyone has any ideas, that would be amazing!!!

Thanks in advance.





 
Yes it does work. Here's a simple MSACCESS.Exe.Manifest that enables XP styles in Access.
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity 
        version="1.0.0.0" 
        processorArchitecture="X86" 
        name="CompanyName.ProductName.YourAppName" 
        type="win32" />
    <description>Your application description here</description>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity 
                type="win32" 
                name="Microsoft.Windows.Common-Controls" 
                version="6.0.0.0" 
                processorArchitecture="X86" 
                publicKeyToken="6595b64144ccf1df" 
                language="*" />
        </dependentAssembly>
    </dependency>
</assembly>
You'll need to dig further to figure out how to code the COM-related stuff.
 
Thanks for the reply. I just want to make sure that what you are saying applies to my situation, so I'll explain it in more detail. I have a .Net Custom control that is being referenced from Access. I do this now by running the .Net Regasm utility on the dll, which creates a Type Library File (.tlb). I then set a reference to that tlb file from within Access. Regasm takes care of registering the dll in the registry.

I want to confirm that you are saying that I can create a manifest and put it in the same folder as my Access application - and that that manifest will replace my need to use Regasm for the registration. This is what I need it to do. Are you saying that it can? And if so, what do I name the manifest? myfile.mdb.manifest or do I use the name of the dll like mydll.dll.manifest?

Thanks again!!
 
I thought the .manifest was for EXE, am I wrong ?
 
I think what you are implying is something that would apply to the Access program as a whole, and maybe I can make that work for me, but what I described above is what I need as the end result. I assumed that I would need the manifest to be the name of my specific mdb and not the overall MSACCESS.exe.manifest file...If I went in your direction, the manifest would apply to any mdb that would run on the machine...which might be Ok...I don't know....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top