I am trying to pass a parameter to the msi through the command line in C#. Here it is: msiexec /I setup.msi /qn USER=Joe I created an installer class that writes to a registry key. I have setup a Custom Action for Install that has the code to write to a registry key in it. If I hardcode the value for the registry key, that value is written correctly to the registry key in the custom action. However, I am not able to retrieve my value from the command line (USER=Joe). I would much appreciate any help. CustomActionData Property for Custom Action for Install: /user="USERNAME" Here is my code in the Installer Class: public override void Install(IDictionary savedState)
{
base.Install(savedState);
// string username = “Joe” (This writes correctly to the registry key if hardcoded)
string username = ??? ( // Code to write to registry key using the username value above
} How do I retrieve the USER=Joe from the msiexec command line above? Thanks,
bsmengen |