开发者

Regasm.exe fails in setup when launched from msi on x64 systems

I have an issue with an installation. The installation runs a command line option to regasm.exe a .net com dll with the /codebase option.

When I run the installation (built by installshield) from the Setup.exe then everything works fine.

When I run the installation from the .msi in开发者_高级运维stead then the regasm call does not succeed, nothing is registered and the program does not run.

This problem only seems to affect x64 based systems, and on x86 systems either method works.

Any ideas what the problem might be?

EDIT

The problem seems to be that even when logged in as an administrator the msi is not executed as an administrator. I still get a UAC dialog, but only mid way through the wizard. When launched from the setup.exe I get the UAC panel before the wizard appears. If I run the .msi from and an administrative command prompt then I get no UAC panel and everything works as expected.

So I imagine that everything is working as expected is it? And that to have the custom install actions work correctly the msi must be run with administrative privileges?


This blog post discusses the need to run an executable with administrator priveleges from the context of an installer. The executable in question is different (appcmd.exe, versus regasm.exe in your case), but the problem sounds similar.

The piece of that post that I think is relevant to you is this:

It turns out that by default, custom actions impersonate the user that started the install, without the administrator elevation that the installer itself runs under. This can be changed by setting the CustomAction’s Impersonate attribute to “no”. That also required adding Execute=”deferred”, and as a result, having the custom action run before InstallFinalize rather than after.

I'm not familiar with InstallShield, but see if there is a way to mark the custom action that runs regasm.exe. You want to look for option(s) that you can set that are phrased similarly to one of the following (these are all different ways of saying the same thing):

  • Set the msidbCustomActionTypeNoImpersonate bit
  • Set the custom action for "deferred execution in system context"
  • Set the custom action for "deferred execution with no impersonation"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜