How to pass parameters to .NET Installer Class
Posted: Sat Jan 14, 2012 9:17 am
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!
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!