如何在按钮单击事件上调用安装程序类,该事件从注册表读取并在C#中的注册表中写入值?
This cannot be done with a single custom action. You should have 2 separate custom actions:
The second action needs Administrator privileges and should run as deferred with no impersonation in InstallExecuteSequence.
Assuming you want to set installer properties based on what is read from registry, using an Installer Class is not really an option. I recommend using a DLL custom action which gets a handle to the installer session. You can find a tutorial here: http://www.codeproject.com/KB/install/msicustomaction.aspx
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.