How to pass parameters to .NET Installer Class

Got a problem you cannot solve? Try here.
Post Reply
rmarma
Posts: 36
Joined: Mon Aug 08, 2011 6:11 am

How to pass parameters to .NET Installer Class

Post by rmarma »

Hi

I have a .NET installer class that requires parameters.
The .NET installer class has code to retrieve the parameters using the InstallContext such as:

public override void Install(System.Collections.IDictionary stateSaver)
{
// Get the custom parameters from the install context.
parameter1 = this.Context.Parameters["MyParam1"];
// etc.
}

When I invoke the setup.exe, I am passing the parameters as follows:

setup.exe MyParam1="123"

but no parameters are being passed to the .NET Installer class. Is there anyhting that needs to be added to the MSI Code to pass the command line arguments?

In InstallShield, we were able to specify a property called ".Net Installer Class Arguments". I attached a screenshot of the InstallShield option.

Please advise.

Thanks!
Attachments
InstallerClassArgs.png
InstallerClassArgs.png (10.27 KiB) Viewed 5638 times
rmarma
Posts: 36
Joined: Mon Aug 08, 2011 6:11 am

Re: How to pass parameters to .NET Installer Class

Post by rmarma »

If you do not support passing arguments to a .NET Installer class, please let me know asap so that I can look for an alternate solution. I would appreciate an answer, be it positive or negative.

Thanks.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: How to pass parameters to .NET Installer Class

Post by giaviv »

Hi,

I am afraid we do not support that at the moment. You would have to use Run Program to call the installer class with custom parameters.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply