How to interactive a silently installing msi? (Progress data and cancel it)

后端 未结 3 1154
梦毁少年i
梦毁少年i 2020-11-29 10:50

For some reason, we are delivering a product with our own install GUI, that means, we will run the msi installation silently background.

By using the MSI API \"MsiIn

3条回答
  •  天涯浪人
    2020-11-29 11:13

    You need to specify an external UI handler using MsiSetExternalUI or MsiSetExternalUIRecord before MsiInstallProduct (the latter is nicer, but has a higher MSI version requirement). The function you specify will be called for each message Windows Installer wants you to process. This will give you the data, and a chance to respond tell it to cancel. If you require MSI 4.5 or later, you can use an embedded external UI handler DLL, which does not require a bootstrap.

提交回复
热议问题