JordanIrwin
01-09-2006, 03:59 PM
I'm having difficulty passing the ProductVersion property to a custom action (executable). My project is an InstallScript MSI Project (IS v11.5), and I am launching a Custom Action during my installation to handle database updates. My custom action has been compiled into an EXE (it's a .NET console app, that accepts command line arguments and returns either 0 (success) or 1603 (failure). I am running the CA after the OnGeneratedMSIScript action, as a Deffered Execution. My CA requires two parameters (technically one, you'll see), the Installation path and the Version number. I can successfully pass the [INSTALLDIR] property, but the [PRODUCTVERSION] property is blank. I have pasted my "Command Line" property for the CA below, it may look funny. Let me explain why.
Since INSTALLDIR is a long string with spaces, I am surrounding it with quotation marks (sort of). When I put the quotation mark on the left and right side, it does not work (the spaces are parsed as new arguments). Doing it this way (with only a quotation on the left side) allows me to pass the entire command line as a single arugment, then I simply parse them out by the comma in my CA. Maybe this is a bug, or I'm not doing something right. Heck, it could be related to my problem.
Command Line for CA:
"[INSTALLDIR],[PRODUCTVERSION]
Anyway, the problem is the PRODUCTVERSION is always empty. Any suggestions? Thanks in advance.
Since INSTALLDIR is a long string with spaces, I am surrounding it with quotation marks (sort of). When I put the quotation mark on the left and right side, it does not work (the spaces are parsed as new arguments). Doing it this way (with only a quotation on the left side) allows me to pass the entire command line as a single arugment, then I simply parse them out by the comma in my CA. Maybe this is a bug, or I'm not doing something right. Heck, it could be related to my problem.
Command Line for CA:
"[INSTALLDIR],[PRODUCTVERSION]
Anyway, the problem is the PRODUCTVERSION is always empty. Any suggestions? Thanks in advance.