strange issue with download component using sourcepath for local file

May 6, 2010 at 4:11 PM

I'm getting a strange issue with a component which is either dynamically downloaded from our website if required or installed from the same directory as the bootstrapper. Code is as follows:

    <component package="#CABPATH\VESharedContent.msi" cmdparameters="" cmdparameters_silent="/qn INSTALLLEVEL=10000" cmdparameters_basic="/qb INSTALLLEVEL=10000" uninstall_package="" uninstall_cmdparameters="/qb-" uninstall_cmdparameters_silent="/qn" uninstall_cmdparameters_basic="/qb-" id="IES &lt;VE&gt; Standard Data &amp; Weather Files" display_name="IES &lt;VE&gt; Standard Data &amp; Weather Files" uninstall_display_name="" os_filter_greater="" os_filter_smaller="" os_filter_lcid="" type="msi" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="True" required="True" selected="True" note="" processor_architecture_filter="x86,x64" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="True">
      <installedcheck path="SOFTWARE\IES\Shared Content" fieldname="InstallLocation" fieldvalue="1" defaultvalue="False" fieldtype="REG_SZ" comparison="exists" rootkey="HKEY_LOCAL_MACHINE" wowoption="WOW64_32" type="check_registry_value" description="Installed Check" />
      <downloaddialog dialog_caption="IES &lt;VE&gt; Standard Data &amp; Weather Files - Download Components" dialog_message="Press 'Start' to download the required components for installing IES &lt;VE&gt; Standard Data &amp; Weather Files." dialog_message_downloading="Downloading ..." dialog_message_copying="Copying ..." dialog_message_connecting="Connecting ..." dialog_message_sendingrequest="Sending request ..." autostartdownload="True" buttonstart_caption="Start" buttoncancel_caption="Cancel">
        <download componentname="IES &lt;VE&gt; Standard Data &amp; Weather Files Installer" sourceurl="http://www.iesve.com/content/mediaAssets/VE%20Download/VESharedContent.msi" sourcepath="#APPPATH\VESharedContent.msi" destinationpath="#CABPATH\" destinationfilename="" alwaysdownload="False" clear_cache="False" />
      </downloaddialog>
    </component>

If VESharedContent.msi doesn't exist in the same directory as the bootstrapper it downloads it & installs it fine. If it does exist the bootstrapper copies it to the location it would've downloaded it to & then launches msiexec to install it. This causes msiexec to throw an error saying "The system administrator has set policies to prevent this installation".

I modified the cmdparameters to launch msiexec with verbose logging. It shows the following:

=== Verbose logging started: 06/05/2010  14:58:04  Build type: SHIP UNICODE 3.01.4000.4042  Calling process: C:\WINDOWS\system32\msiexec.exe ===
MSI (c) (9C:DC) [14:58:04:176]: Resetting cached policy values
MSI (c) (9C:DC) [14:58:04:176]: Machine policy value 'Debug' is 0
MSI (c) (9C:DC) [14:58:04:176]: ******* RunEngine:
           ******* Product: C:\DOCUME~1\zxc\LOCALS~1\Temp\{ED9ED17D-8854-4B10-BDD2-56A4F18C53DF}\VESharedContent.msi
           ******* Action:
           ******* CommandLine: **********
MSI (c) (9C:DC) [14:58:04:207]: Machine policy value 'DisableUserInstalls' is 0
MSI (c) (9C:DC) [14:58:10:801]: SOFTWARE RESTRICTION POLICY: Verifying package --> 'C:\DOCUME~1\zxc\LOCALS~1\Temp\{ED9ED17D-8854-4B10-BDD2-56A4F18C53DF}\VESharedContent.msi' against software restriction policy
MSI (c) (9C:DC) [14:58:10:816]: SOFTWARE RESTRICTION POLICY: C:\DOCUME~1\zxc\LOCALS~1\Temp\{ED9ED17D-8854-4B10-BDD2-56A4F18C53DF}\VESharedContent.msi has a digital signature
MSI (c) (9C:DC) [14:58:21:269]: SOFTWARE RESTRICTION POLICY: SaferIdentifyLevel reported failure.  Assuming untrusted. . . (GetLastError returned 5)
MSI (c) (9C:DC) [14:58:21:269]: The installation of C:\DOCUME~1\zxc\LOCALS~1\Temp\{ED9ED17D-8854-4B10-BDD2-56A4F18C53DF}\VESharedContent.msi is not permitted due to an error in software restriction policy processing. The object cannot be trusted.

MSI (c) (9C:DC) [14:58:21:316]: Note: 1: 1718 2: C:\DOCUME~1\zxc\LOCALS~1\Temp\72117a.msi
MSI (c) (9C:DC) [14:58:21:363]: MainEngineThread is returning 1625
=== Verbose logging stopped: 06/05/2010  14:58:21 ===

 The dotnetinstaller log for that component is as follows:

 

2010-05-06 14:57:53 --- Component 'IES <VE> Standard Data & Weather Files' (IES <VE> Standard Data & Weather Files): EXECUTING
2010-05-06 14:57:53 Extracting embedded files for component 'IES <VE> Standard Data & Weather Files': NO FILES EMBEDDED
2010-05-06 14:57:53 Destination 'C:\DOCUME~1\zxc\LOCALS~1\Temp\{ED9ED17D-8854-4B10-BDD2-56A4F18C53DF}\VESharedContent.msi', exists=False, copy=True
2010-05-06 14:57:53 Opening download dialog 'IES <VE> Standard Data & Weather Files - Download Components'
2010-05-06 14:57:53 Destination 'C:\DOCUME~1\zxc\LOCALS~1\Temp\{ED9ED17D-8854-4B10-BDD2-56A4F18C53DF}\VESharedContent.msi', exists=False, copy=True
2010-05-06 14:57:53 Copying 'IES <VE> Standard Data & Weather Files Installer', source='C:\TEMP\VESharedContent.msi', destination='C:\DOCUME~1\zxc\LOCALS~1\Temp\{ED9ED17D-8854-4B10-BDD2-56A4F18C53DF}\', full='C:\DOCUME~1\zxc\LOCALS~1\Temp\{ED9ED17D-8854-4B10-BDD2-56A4F18C53DF}\VESharedContent.msi', always download=False', destination exists=False
2010-05-06 14:58:03 Copy 'IES <VE> Standard Data & Weather Files Installer', size=409.0MB: OK
2010-05-06 14:58:03 --- Download OK
2010-05-06 14:58:03 Closing download dialog 'IES <VE> Standard Data & Weather Files - Download Components'
2010-05-06 14:58:03 -- Package: C:\DOCUME~1\zxc\LOCALS~1\Temp\{ED9ED17D-8854-4B10-BDD2-56A4F18C53DF}\VESharedContent.msi
2010-05-06 14:58:03 -- Additional command-line parameters: /l*vx C:\DOCUME~1\zxc\LOCALS~1\Temp\VE6SetupLogs\VESharedContent.log
2010-05-06 14:58:03 Executing: msiexec /i "C:\DOCUME~1\zxc\LOCALS~1\Temp\{ED9ED17D-8854-4B10-BDD2-56A4F18C53DF}\VESharedContent.msi" /l*vx C:\DOCUME~1\zxc\LOCALS~1\Temp\VE6SetupLogs\VESharedContent.log
2010-05-06 15:10:41 --- Component 'IES <VE> Standard Data & Weather Files (IES <VE> Standard Data & Weather Files): DIALOG CLOSED
2010-05-06 15:10:41 *** Component 'IES <VE> Standard Data & Weather Files' (IES <VE> Standard Data & Weather Files): ERROR - Error executing 'IES <VE> Standard Data & Weather Files' (IES <VE> Standard Data & Weather Files): 0x659
2010-05-06 15:10:41 --- Component 'IES <VE> Standard Data & Weather Files (IES <VE> Standard Data & Weather Files)' FAILED: Error executing 'IES <VE> Standard Data & Weather Files' (IES <VE> Standard Data & Weather Files): 0x659

I checked the digital signature on the copied file & it appears to be OK. I can even browse to the temp directory & double click on the copied MSI & it will install quite happily. Why it fails when dni launches it I have absolutely no idea.

All my testing is on an XP64 virtual machine on VMWare ESXi 4.0. It works fine in all cases on XP32. I haven't had time to test Vista or Windows 7 yet.

Coordinator
May 7, 2010 at 1:36 PM

First, check that the following KB doesn't fix the problem: http://support.microsoft.com/kb/925336.

May 7, 2010 at 2:30 PM

That fixes it. We've got memory issues on the machine which runs ESXi (trying to get more RAM ordered for it) which would explain why it's happening now when both dni & msiexec are running. Guess I didn't look hard enough at the Microsoft support site trying to find a possible cause. Glad I don't need to worry about it in the wild though.

Thanks for the help as always.