Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > CustomActionData double quotes
 

CustomActionData double quotes

Ok so I have a custom action, I need to pass command line arguments to it.

The command line arguments contain Double Quotes, but Double Quotes are used to define the CustomActionData boundries.

How would I send through a string like so:

"/c "some data" /b "some other data""

?

AndyJump  Monday, August 13, 2007 3:56 PM

After doing some tests this morning you use \ just as you would in c#.

i.e. "this is a \"string with double quotes\" value"

HOpefully this will help anyone else looking on how to do this.

AndyJump  Tuesday, August 14, 2007 1:14 PM

Not sure exactly what you're trying to do here. If you really want command line arguments for passing to an executable custom action, just put them in the Arguments property, pretty much whatever you like, and forget CustomActionData.

If you're calling an installer class method the syntax is /arg=value /arg1=value1 and you don't really need quotes because the delimiter is the /.

PhilWilson  Monday, August 13, 2007 7:22 PM

When assigning a property to pass through if the value contains spaces you need to have it enclosed in double quotes.

i.e. /arg="this is a value"

I want to have double quotes in this value as well.

i.e. /arg="this is a "string with double quotes" value"

In C# you'd escape the double quotes either byusing \

i.e. "this is a \"string with double quotes\" value"

Theres nothing in the documentation to say what you should use with properties being sent to CustomActionData, they just say use double quotes if you have spaces.

AndyJump  Monday, August 13, 2007 7:31 PM

After doing some tests this morning you use \ just as you would in c#.

i.e. "this is a \"string with double quotes\" value"

HOpefully this will help anyone else looking on how to do this.

AndyJump  Tuesday, August 14, 2007 1:14 PM

You can use google to search for other answers

Custom Search

More Threads

• How to check for pre-requisite?
• Increment Version Number automatically
• Published application file list is incomplete
• ClickOnce stops silently at "Verifying application requirements"
• what this error mean? and how i can solve it?
• Setup upgrade and full install from the same MSI
• Deploying SQL Server CE with a ClickOnce application
• Insert disk while installing from CD
• Redistributing ActiveX on target machine problem
• Unknown Publisher