Visual Studio installation actions allow specifying command line parameters.
Recently, I tried using this to get a handle on the target directory where the applicaiton is installed. Unfortunately, the installer fails parsing the [TARGETDIR] property. The installer aborts reporting a failure to find a file or assembly in C:WindowsSystem32FileISRMyPoductName. The installation log sheds no