0

I am trying to get a value from one of the text box dialogs in Visual Studio Setup Project into a custom action installer class. It seems that it doesn't like it when someone enters a string with a space in it. If a user enters a string with no spaces or quotation marks I can retrieve the string no problem. Otherwise I am getting this error:

Exception occurred while initializing the installation: System.ArgumentException: File Source=localhost;Initial does not exist. If this parameter is used as an installer option, the format must be /key=[value]

Please note that the string is a database connection and "Source=localhost;Initial" would be the second token, if i were to split the entire string on a space. I am clearly missing something here because I cannot imagine that this is an actual limitation of the Visual Studio

aceinthehole
  • 5,122
  • 11
  • 38
  • 54

1 Answers1

0

You may have to surround your parameter with quotation marks, something like:

/connectionString="[CONNECTIONSTRING]"

That's just a guess, I'm basing it on http://msdn.microsoft.com/en-us/library/2w2fhwzz%28VS.71%29.aspx which suggests that values with spaces in them need to be quoted. The documentation doesn't address your situation exactly, so it's hard to tell.

E.Z. Hart
  • 5,717
  • 1
  • 30
  • 24