How To Register Assembly With Regasm Using Installshield

3/23/2018by

A.net assembly during installation using. Use of Registration Free COM Interop. Component so InstallShield doesn't run regasm. Setting '.NET Assembly. I can register the dll using regasm but not installshield. Can anyone suggest how I can register the dll using installshield?

How To Register Assembly With Regasm Using Installshield

I am working on a task not to prompt a normal user a popup(UAC) for approval to install windows Addin application while registering a.net assembly during installation using instalshield. On windows xp, its working fine but during installation on vista and windows 7, a popup comes up for approval.

As per the requirement, it shouldnt come. Is there any way to bypass this pop up on vista and windows 7 if UAC is on and registered the assembly per user without administrator privileges? Actually, COM can be registered per-user or per-machine as HKEY_CLASSES_ROOT is a view derived from both HKEY_CURRENT_USER Software Classes and HKEY_LOCAL_MACHINE Software Classes. If you run regasm /regfile:foo.dll you can generate a regfile and then change all the references in the key names to make it local to the current user.

In the.reg file that gets generated, all the reg key additions will be to HKEY_CLASSES_ROOT. You need to replace these with 'HKEY_CURRENT_USER Software Classes'.

Give More Feedback

Also if you need the COM registration to work with 32 bit applications and you're running x64, then for additions to HKEY_CLASSES_ROOT CLSID, you'll need to insert ' Wow6432Node' before the CLSID token like. To be clear, additions to 'HKEY_CLASSES_ROOT CLSID' become 'HKEY_CURRENT_USER Software Classes Wow6432Node CLSID'. To make it work on x86 you only need to make this change for CLSID entries. Also, in certain situations, you can consider making use of Registration Free COM Interop by creating a manifest file for the EXE that consumes the COM server to make the ProgID/ClassID's available to the EXE without actually writing the registration information to the registry. This is a common mistake among developers which are not familiar with elevation and user privileges.

The assembly you are installing is registered per-machine. This is why it requires elevation for its registration process. It's also elevated on XP, but you don't see if because its automatic. If you would run the installation under a normal user account, it would fail because of insufficient privileges. Since this assembly was designed to be registered per-machine, why are you trying to change its behavior?

It's like trying to modify Windows to support your application. You adapt to the environment, not the other way around. So the correct solution would be to use a per-machine installer. This way your installation process will be installed for all users and will always require Administrator privileges.

Per-user installations are designed for products which use only per-user locations. If you are installing resources in a per-machine location, then you should use a per-machine installation. Final Fantasy 7 Filme Dublado Rmvb there.

Hi, I found a lot of people with the same problem as me but i haven't found the solution that works. I have a VB6 application that uses a.NET DLL.

I already know that if i want to use this DLL in my application i have to generate a TLB key file(witch is done by VS2005), and then registrate the DLL with the command line: 'Regasm MyDLL.dll /tlb: MyDLL.tlb'. My installer also has to registrate the DLL on the target machine. So i made the installer, added my files (MyApp.exe, MyDLL.dll and MyDLL.tlb) then went in the 'Installation Designer' to the tab 'Components' under 'Organization'. Selected the 'MyDLL.dll' file and set '.NET COM Interop' to 'Yes'. Then i build the installer and tried to install it on a clean PC.

While installing the error: 'Error 1904. Module ~ MyDLL.dll failed to register. Contact your support personnel.' And after that the application does not work. Now i don't know what to do.

I know i could make a batch file that registrates the DLL for me and than add it as a custom action, there are only 2 problems with that: 1. I don't know how to make the custom action and 2. When uninstalling, it does not undo the registration of the DLL.

Comments are closed.