简体   繁体   中英

Get the name of the current msi installation file from an Installer class

It is possible to get the name of the current installation file (.msi) from the Installer class of custom action ?

I need something like this:

[RunInstaller(true)]
public partial class ProjectInstaller : Installer
{
    public ProjectInstaller()
    {
        InitializeComponent();

        **var fileName = CurrentMSIFileName();**
    }
}

Thank you!!

I have found the solution based on Christopher Painter's Answer is by using OriginalDatabase property. Now I am able to get the msi installer file name in both during installation and uninstallation

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