How to read certain registry key from Wix managed bootstrapper or custom action?

前提是你 提交于 2019-12-02 05:37:51

Debugging Managed Code Custom Actions: Not quite clear what the problem is? The read does not work as a custom action? Try showing a message box from the custom action and then attach the debugger to the rundll32.exe process running managed code. Then you can step through the code using Visual Studio in normal "debug fashion". Here is a nice video from Advanced Installer showing you how to do this: Debug C# Custom Actions.

Registry Read: Once you have debugability, it should be possible to work out what the cause is of whatever problem it is that you are seeing.

  • Suppressed Exception: Maybe there is an exception of some sort happening and you have set the error checking for the custom action to "ignore exit code"?
  • Bitness: The most common problem seems to be "bitness" (32-bit vs 64-bit) - in other words you read the wrong registry location, but I don't think this is the problem you are seeing.
  • Access Violation?: It could also be that you are running something that requires admin rights from the GUI sequence before the setup has elevated to admin rights. That might trigger an access rights exception.

Just some ideas off the top of my head. Please let us know what it was.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!