PDA

View Full Version : Why is '.NET Com Interop' option not performing Regasm correctly?



BrHartmann
11-05-2012, 07:41 PM
Hi,

I've searched the forums, and see this has been discussed in the past (see http://community.installshield.com/showthread.php?t=202935 for instance).

However, I'd really like to hear from someone at Flexera as to whether this is considered a bug in IS and will be fixed, or what the official recommended workaround is. In the post referenced above, Chris mentioned a limitation with "regasm /regfile" ... can you guys elaborate further on this?

We have many components using the ".NET COM Interop" flag, and these have generally worked fine in the past. We just added a new component which is a shell extension dll, adding some items to context menus in Windows Explorer, and this does not work during install, though manually running regasm on the file works fine. We were previously using IS 2012 and I just upgraded to the 2012 Spring edition, but no change in behavior. We also recently started targeting .NET 4.0 Client instead of 3.5sp1, but I made sure the InstallShield .NET tab in Options points to the v4.0.30319 folders (ie. C:\Windows\Microsoft.NET\Framework64\v4.0.30319).

Not sure if this matters, but we're using an Installscript-MSI project.

BrHartmann
11-07-2012, 04:43 PM
In case anyone else comes across a problem like this, I learned (though use of registry capture and filtering/comparing) that the only keys Installshield was missing in this case were of this flavor:

HKCR\.pdf\shellex\ContextMenuHandlers\{GUID} (where GUID is the actual GUID of our shell extension that is being registered)

It sounds like this is a Microsoft bug (when running Regasm /regfile), so you can work around it by manually adding the additional reg keys to your project (or run Regasm via custom action, but I prefer the other method if the missing keys can be identified).

Christopher Painter
11-08-2012, 11:03 PM
Per the regasm doco at:

http://msdn.microsoft.com/en-us/library/tzat5yw6%28v=vs.71%29.aspx

"Note that the .reg file does not contain any registry updates that can be made by user-defined register functions."