简体   繁体   中英

How to use MSI.DLL to programatically install .msi file and also provide abort/cancel?

In order to provide custom more friendly looking UI when updating the application via the downloaded.msi file I have to provide a custom (WPF, if it matters) window that will in turn replicate what msiexec is doing by calling MSI.DLL functions via interop.

Initially it was a simple msiexec call against the downloaded.msi file, and it would be nice if it could stay that simple.

I also need to provide Cancel functionality just like msiexec does.

What would be the proper way to programatically start/stop/abort this via MSI.DLL functions?

(What I did is look at different MSI Interop implementations, WiX included, but couldn't easily recognize APIs to do this).

That's what MSI calls an "external UI handler." See the MSI SDK for details, such as "Monitoring an Installation Using MsiSetExternalUI."

Thanks everybody, reading the stuff you posted was an interesting learning experience.

However it turns out that I didn't dig enough on StackOverflow, my question was already posted and answered here:

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

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM