WebSetup Installer not getting CustomDataAction values
I have a websetup package where I am using CustomActionData for the connection string. I have the following parameter setup in my "Primary output" node under Install and Commit for my installer:
/ConnectionString=[CONNECTIONSTRING]
My Installer class accepts this value as follows:
string connectionString = context.Parameters["Connec开发者_运维问答tionString"];
However when I execute msiexec as follows:
msiexec /i WebTestInstaller.msi ConnectionString="test" /quiet
The "context" object above never gets the "test" value. The "connectionstring" array variable is always empty.
Am I missing something here?
You need to use this command line:
msiexec /i WebTestInstaller.msi CONNECTIONSTRING="test" /quiet
You are setting the installer property, not the parameter. During install the parameter uses the property value.
精彩评论