1
votes

I have written a .net dll that I can successfully call from vb6. Deployment to xp, vista 32, and vista 64 boxes have been working. It is not working on windows 7 64 bit. I cannot run regasm.exe /codebase name.dll on the end users machine because they are not admins.

Currently my app is deployed in the "c:\Program Files (x86)\application name" directory.

3
How are you installing it without admin privileges?SLaks
The initial install has admin privs. I need to be able to update it without admin privs.sparkkkey
What are you trying to update? You will not be able to update the DLL in Program Files without admin privileges. (Unless you modify the ACLs)SLaks
I have the folder permissions set so that a user can update the dll.sparkkkey

3 Answers

2
votes

I'm using registration free COM to access the .NET interop assemblies.

Basicly first you have to create assembly manifest with mt.exe and optionally re-sign strong names with sn.exe like this

mt.exe -managedassemblyname:{Your_DLL} -nodependency -out:{Your_DLL}.manifest
mt.exe -manifest {Your_DLL}.manifest -outputresource:%{Your_DLL};1
sn -Ra {Your_DLL} {Your_PFX}

Then reference this assembly manifest in your application manifest like this

<dependency>
    <dependentAssembly>
        <assemblyIdentity name="{Your_DLL}" version="1.0.0.0" publicKeyToken="hash_here" processorArchitecture="x86" />
    </dependentAssembly>
</dependency>

where assemblyIdentity matches assemblyIdentity in assembly manifest of {Your_DLL}.

On client machines both the VB6 executable and .NET dll must be in the same folder. No regasm and no GAC registration needed.

I'm using UMMM tool to automate the manifest creation process but you can do it manually if it's a one time setup.

0
votes

Deployment requires admin rights. It's supposed to fail in this case.