Install Util fails if more than 10 variables are passed through it?

I’m not sure about this one. InstallUtil started failing for me with a FileNotFoundException, which was odd as the files involved definitely hadn’t changed. All that had changed was the variables I was passing through.

At first I thought it was the length of the InstallUtil command line, but it was nowhere near too long, and on shortening it I found that I had a shorter command line than a previous successful deployment, so that didn’t make sense.

Finally I tried turning off variables one by one - and it seems that no matter which one I turned off, it started working again. So with 11 variables going through it fails, with 10 it succeeds. I couldn’t find anything like this after googling so I’m not sure where the problem lies.

As a (quick) workaround, how realistic would it be to have a checkbox next to the variables, something like “Pass to Installers” that’s off by default? That way I can send to InstallUtil only the variables it needs, but still have no limit on my powershell variables.

This has really bitten me today… if it was possible for you to investigate and get a fix on this I’d be incredibly grateful!

(I knew I spoke too soon on that ‘minor issues’ thread that everything was sorted!)

Actually, that’s all false as well. Even cutting down the variables to just 8 now doesn’t work, so that looks like a red herring. Any idea why InstallUtil would fail with FileNotFound?

Ah! Ok. It seems that it was to do with my variables, but not because of their length or number (mercifully, as that made no sense at all, but I couldn’t understand why it would suddenly work if I disabled some of them!)

The answer appears to be that some of my variables were paths, and ended with a . The slash was being interpreted as an escape character, so it had the effect of escaping the quote mark on the command line, so I ended up with a mismatch of parameters, and it couldn’t find the fictional service that it thought I was then telling it to install.

Moral appears to be don’t end a variable with a single slash character.

Sorry to clog up the forum but hopefully this will be useful to someone else…

Thanks heaps for the update Neil, escaping the strings is probably something Octopus should be doing anyway, so I will take a look at that tonight.