What immediate errors do you get without the quotes? Perhaps you should try
hard quotes (single quotes) around the password argument, and single quote
around the server argument. Or, perhaps two \ in the server argument so that
the \ is quoted.
Without the quotes I get an error that the .exe can't be found. I swear this is driving me insane.
I've been able to fill in the blanks a little bit more by keeping the remnant VM around when the build fails. I've now got the quotes in the right place and the arguments are being correctly passed to the .exe. I can now see (via the log that the .exe generates) that it's kicking off correctly and attempting to run a .sql statement. That's now what is failing. I'm getting a "can't find the file specified" message...which I think is actually a problem finding the "sqlcmd" program.
So...in the remnant machine if I log in and run the initial command manually everything works great and the generated logfile shows that the .sql statement succeeded (the line in the successful logfile is something like "sqlcmd -option -option -option server.sql". In the unsuccessful logfile I see it call for the server.sql file (which is definitely in the directory), but the next line is "can't find file specified".
Pure supposition on my part (I didn't write the damn .exe) is that the WAP is not able to call sqlcmd. Some kind of path issue perhaps? Do I need to be doing something in Studio to make sure that it can find/call sqlcmd?
Perhaps a better question, since this always seems to work A-OK on the remnant VM after the package installation has failed...
How do I get the command to run "on" the appliance that I'm creating (using files, paths, etc. that are truly local to that machine) rather than from the Windows package that I've created? So if I want to simply switch from P: to C: and run a command from there, what would I do? I've attempted this (via batch file):
cd \Program Files (x86)\blah\blah\bin
applicationinstaller.exe -option -option -option
But it's not worked.
I swear, it's a good thing I only work on the second floor or I'd be tempted to jump out the window.
OK, I figured out the problem...the .exe I was calling relys on updated PATH information, which hadn't yet been updated as I'd not rebooted from a previous install. As soon as I put a reboot into the package installation process what I was trying to do worked perfectly.