0
Vote

ComponentChk.exe exited with code 2 when checking for Word PIA

description

Running external check with command 'C:\DOCUME~1\msmithlo\LOCALS~1\Temp\VSD379.tmp\Office2003or2007PIA_WordOnly\ComponentChk.exe' and parameters ' /save {1C8772BD-6E6F-4C9D-8FF8-B5EA072F86EF} {816D4DFD-FF7B-4C16-8943-EEB07DF989CB}'
Process exited with code 2
Setting value '2 {int}' for property 'WordPIARegistered'
The following properties have been set for package 'Microsoft Office 2003 or 2007 Primary Interop Assemblies':
Property: [SupportedWordVersionInstalled] = 0 {int}
Property: [WordPIARegistered] = 2 {int}
Result of checks for command 'Office2003or2007PIA_WordOnly\ComponentChk.exe' is 'Install'
'Microsoft Office 2003 or 2007 Primary Interop Assemblies' RunCheck result: Install Needed

comments

wrote Jun 2, 2008 at 7:49 AM

According to MSDN (http://msdn.microsoft.com/en-us/library/ms681382(VS.85).aspx), exit code "2" is equivalent to ERROR_FILE_NOT_FOUND = "The system cannot find the file specified."
 
Using Procmon.exe to watch all activity generated by ComponentChk.exe, all I can attribute to its search for the PIA component is enumerating all Keys under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall.  However, none of the GUIDs in the product.xml file seem to match the enumerated entries, so that doesn't help at all.

wrote Jun 2, 2008 at 3:50 PM

Procmon.exe results - secondary examination: Procmon shows two instances of ComponentChk.exe starting up and exiting, and records the Exit Code for each.  It shows that for the instance that exits with code = "2", the ONLY operations that it performs are Registry queries (i.e. no queries of the filesystem).  So ERROR_FILE_NOT_FOUND must in this case be used to assert "Registry entry not found".

wrote Jun 2, 2008 at 4:16 PM

Trying to debug the issue, I switched the product.xml reference from the Word PIAs to the Office PIAs, but the Install.log shows the same results:
 
Running external check with command 'C:\DOCUME~1\msmithlo\LOCALS~1\Temp\VSD3BF.tmp\Office2003or2007PIA_WordOnly\ComponentChk.exe' and parameters '/save {91490409-6000-11D3-8CFE-0150048383C9} {50120000-1105-0000-0000-0000000FF1CE}'Process exited with code 2Setting value '2 {int}' for property 'OfficePIAsRegistered'

wrote Jun 2, 2008 at 4:21 PM

Now, let's try the VSTO Troubleshooter once more - does it report any Office and/or Word PIAs installed?  It reports:
  • Microsoft Office 2003 Word PIA (Microsoft.Office.Interop.Word.dll) (v11.0.8161.0) IS installed
  • Microsoft Office 2007 Word PIA (Microsoft.Office.Interop.Word.dll) is NOT installed
  • Microsoft Office 2003 Primary Interop Assemblies Redistributable is NOT installed
  • Microsoft Office 2007 Primary Interop Assemblies Redistributable is NOT installed
     
    So either the code logic is wrong, or I'm using the wrong Component IDs for the Word PIA.

wrote Jun 2, 2008 at 6:31 PM

Checking the Office Professional 2003 configuration: under Microsoft Office Word, the ".NET Programmability Support" component is currently displayed as "Run from my computer".  This agrees with what the VSTO Troubleshooter found.
 
I tried using ProcMon.exe to find out what the VSTO Troubleshooter was looking for, but unfortunately a string search for the PIA Component IDs (Word 2003, 2007; Office 2003, 2007) came back negative.  I'll have to dig into more detail in the ProcMon trace to see what is being detected, and if it's some translation of the Component IDs (e.g. without the "{}" characters).

wrote Jun 5, 2008 at 6:37 AM

For comparison purposes, I switched the Setup project back to pre-requiring Office2003 PIAs.  Even without the Office PIAs redistributable installed, the Setup.exe was able to move on to the MSI install.  I double-checked both the Install.log and the ProcMon traces, and it shows that ComponentCheck.exe went looking for the Word 2003 PIA using the same Component ID value that wouldn't work with the ComponentChk.exe codebase:
 
Running external check with command 'C:\DOCUME~1\msmithlo\LOCALS~1\Temp\VSD31E.tmp\Office2003PIA\ComponentCheck.exe' and parameters '{3EC1EAE0-A256-411D-B00B-016CA8376078}'Process exited with code 0Setting value '0 {int}' for property 'Office2003Exists'Running external check with command 'C:\DOCUME~1\msmithlo\LOCALS~1\Temp\VSD31E.tmp\Office2003PIA\ComponentCheck.exe' and parameters '{1C8772BD-6E6F-4C9D-8FF8-B5EA072F86EF}'Process exited with code 0Setting value '0 {int}' for property 'Word2003PIARegistered'
ProcMon shows that ComponentCheck.exe starts its search for the Word 2003 PIA not by searching the Uninstall keys, but by probing very specifically into the Installer Components listings in the Registry:
HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\DB2778C1F6E6D9C4F88F5BAE70F268FE
 
[NOTE: it's transposing each hex pair from the "Component ID" when it searches in the Registry.  No, I don't know why.]

wrote Feb 13, 2013 at 11:01 PM