PDA

View Full Version : Prerequisite SQL Server says it failed but application is successful



DLee65
12-03-2013, 10:30 AM
I am including the standard Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) in a Suite package.
If I include the PRQ file in a basic MSI package I can successfully install the prerequisite on Windows 7 x86.
If I include the PRQ file in the Suite package the install fails.
The command line looks correct, below is information from the debuglog file.

DLee65
12-03-2013, 10:31 AM
I am having problems submitting new threads that include the '\' character, but I can reply to threads, so here is the log file results:

Will launch exe: C:\Users\DLee\AppData\Local\Downloaded Installations\{8034C99E-3BC0-4E53-BC6E-02E3D8CF5378}\vcredist_x86.exe
EXE parcel command line: /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qb! /l*v %tmp%\vcredist_x86_2005.log"" "
EXE parcel resolved command line: /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qb! /l*v %tmp%\vcredist_x86_2005.log"" "
Launch EXE result: 0
Final result status for EXE parcel: 0
Engine: property 'ISInstallStatus' value now 'Package operation complete'
Engine: property 'ISParcelStatus' value now 'ID_STRING51
Parcel operation return status: 0


It appears that it did not even attempt to execute the package.
Note that this log file shows the /qb! option. I had manually changed this test run to this value. The original value is /qn. I wanted to see if the UI even shows up as part of debugging this.

Could it be that I need to alter the quotes for the Suite installer? I had double checked this with Aaron Stebner's blog post to verify the syntax. He is usually my go-to guy for issues on redistributable syntax.
Perhaps the logging syntax is throwing it off?

DLee65
12-03-2013, 11:24 AM
If I copy the command line from the debuglog file and open a CMD prompt and then paste the command line verbatim, then the install succeeds.

I am almost willing to wager that the Suite package is not quoting the path to the EXE because it does contain spaces and should be quoted. The thing that troubles me is that it works for other prerequisites.
Note that I a caching the prerequisites, at least for now during the debug and early QA stages. Then when we are satisfied with the stability of the product then the permanent files such as the VCREDIST files, .NET, and others will not be cached to reduce the payload on a consumer's system.

The Basic MSI prerequisite engine must handle quoting long paths successfully, since I do not experience this problem there.
However, other packages that I have imported have not had this problem, and they are all going to the same destination directory, and so that is perplexing. I will go back to see if there is a switch that tells it to quote long paths.

I have noticed that the other files do not include double quotes in their command lines either. The Microsoft Visual C++ SP1 Redistributable Package is the only one that requires double quotes in the EXE Command Line. I am going to run a test without the EXE Command line to see if causes the setup to launch.

DLee65
12-03-2013, 11:39 AM
Sure enough, if I eliminate the command line with the quotes, then the installation will launch.

Is there some way around this issue?

DLee65
12-03-2013, 02:19 PM
I am wondering if the Suite setup is having problems with the command line itself? I know the MSI command line cannot accept the /q or /l parameters. However, in this case the msiexec command is embeded within the EXE command. The help documentation does state that it should be able to handle "any command-line parameters that are supported by the .exe file."

DLee65
12-03-2013, 03:18 PM
So I had a Steve Martin moment reminiscent of the 'Jerk' where he yells out 'He hates those cans!' :D I thought the problem was related to the double quotes in the command line; however, it is not.

The problem has to do with the %tmp%\vcredist_x86.log reference in the command line.

The actual command line for future reference should be: /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qb! /l*v [TempFolder]vcredist_x86_2005.log"" "

Also, the Detect Condition needs to be modified slightly. When importing the PRQ an additional parameter value is supplied for registry Exists, Architecture. It is set to x64. Set it to x86. Set the 64-Bit Key to True. This is because the Installer will write its value to the 64bit key on 64bit operating systems even though it is a x86 file. This allows the Detection Condition to succeed on both architectures.

Thank you to Justin @ InstallShield for the assistance.

hidenori
12-03-2013, 03:35 PM
I created #IOA-000084390 to fix the bug with importing the Check 64-Bit Key setting, and #IOA-000084393 to track the issue with environment variable references in the EXE command line.

Thank you for reporting this!