Hello John,
I apologize for the confusion. Now I think I completely understood your scenario. Indeed, this happens because you are trying to directly access an explicit parameter (i.e. connectionString) set in the "CustomActionData" property. Indeed, when a parameter value include the
; semicolon character, then its value will be truncated. However, this behavior it is not influenced by Advanced Installer, but the "session" object. All that Advanced Installer does is to set the "CustomActionData" property value with the string set in the "Action Data" field of your custom action.
It seems, when using a C# custom action, to escape the
; character within a parameter value (set in the "CustomActionData" property) you should duplicate it. For example, you can set the "Action Data" field of your custom action like this:
Code: Select all
connectionstring=UID=user1;;PWD=pass1;;;connectionstring2=UID=user2;;PWD=pass2;;
and then access within your C# action code the "connectionstring" and "connectionstring2" parameters like this:
Code: Select all
string param1 = session.CustomActionData["connectionstring"];
string param2 = session.CustomActionData["connectionstring2"];
Also, as another solution you can use a C# statement like this:
Code: Select all
string custom_action_data_value = session["CustomActionData"];
to access the entire value of the "CustomActionData" property, and then parse the "custom_action_data_value" string in your custom action code and process it as you need.
If you have any questions just let us know.
All the best,
Daniel
FOLLOW US
Get the latest news in Application Packaging