views:

53

answers:

1

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!!

A: 

Just override some function of Installer class. See example on MSDN. http://msdn.microsoft.com/en-us/library/system.configuration.install.installer.aspx

Vasiliy Borovyak
I search a lot into Installer class but there is not the name of the .MSI file. In the Context property there are command lines arguments but not the name of the file MSI.
Cyberman