Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 3

Issues when trying install a self-registering assembly in Windows 7


I have a couple of self-registering dlls in a Component - mfc40.dll, mfc42.dll.

It throws the error:

The following files did not self-register or unregister:
An event was unable to invoke any of the subscribers

1. Strangely this error comes only in Windows 7 and only for mfc40.dll

2. The target installation machine already has mfc40.dll in the system32 folder. The version is same as the one i am trying to install but last modified date is newer.

3. My installer will install this dll only when the version is higher and/or the date is newer.

4. Tried running the installer as an Administrator. Same error.

5. Manually regsvr32 the file. Got registered successfully. Tried running the installer again. Same error.

6. Tried checking if any dependency was missing using Depends 22. It did identify IEshmil.dll. Copied that file from c:\Program Files\Internet Explorer to system32. Ran my installer again. Same error.

It would be great if someone ran into the same issue and got it resolved. Did see a thread for the same problem but does not say if the error got resolved.

Thanks in advance
Labels (1)
0 Kudos
(3) Replies
Level 7

Are you running an MSI or EXE file?

If MSI, create an EXE.

When going to run the EXE, right click and 'run as administrator'. Not to be confused with being part of the administrators group, it's not the same thing.

Create an EXE version, right click and 'Run as administrator'. See if that helps. If that doens't solve your issue, please post again.
0 Kudos
Level 10

Why are you installing Microsoft components into the system folder in your install in the first place? Can you use Microsoft merge modules instead? I would imagine the mfc files are covered by Windows File Protection on Windows 7.
0 Kudos
Level 3


This is a Setup and i right click on Setup.exe Run As Admin. It didnt quite work out.


Any idea how i could find which merge module would contain mc40.dll. I think this file is under lockdown by the Windows 7 for some reason.

Interestingly, i changed my installer to manualy register the assembly through LaunchAppAndWait, that worked fine. But strangely do not see any registry entries for the same.

Also if you guys have worked extensively on windows7, any idea why it takes so long for the installer to install files on to a windows 7 machine ( i mean just copying them to the c:\program files folder) as against an XP machine?

0 Kudos