MSI Component not showing in ARP x64 when UAC is turned on

Jan 25, 2012 at 8:00 AM

Hi everyone, This is my first post and I have done quite some reading on this great tool.

I am facing a problem whereby when I package the MSI into a bootstrapper and run it on an x64 platform, I do not get the MSI product shown in the Add Remove Program of Control Panel. 

I did some checking and found the following:

1. UAC is turned on - so when I install the product and in the UAC I key in the admin user ID and pwd, the install goes ok. The correct registry key is created in the wow6432Node but no entries of "MyProduct" in the add remove program. If I log in as the administrator, then it shows the 'MyProduct' in the add remove program. Not sure why this happens. It does not happen If I run the MSI individually.

2. Uninstall via the bootstrapper does not remove the registry key from the 'installedcheck' path in the wow6432node below. This creates problem when I try to run the bootstrapper again, as it assumes that the product is already installed.

3. There is no problem running the bootstrapper for install and uninstall on a x86 machine. 

4. By default the MSI installs as per-user. If some commands are passed during CMD line installation it can install as per-machine.

5. Other Prereq, dotnetfx are installed correctly.

The following is the code for the MSI Package. Can anyone please guide me where I have gone wrong? Thanks.

    <component package="#CABPATH\MyProduct.msi" cmdparameters="" cmdparameters_silent="/qn" cmdparameters_basic="/qb-" uninstall_package="#CABPATH\MyProduct.msi" uninstall_cmdparameters="/qb-" uninstall_cmdparameters_silent="/qn" uninstall_cmdparameters_basic="/qb-" disable_wow64_fs_redirection="False" id="MyProductInstaller" display_name="MyProduct.msi" uninstall_display_name="" os_filter="" os_filter_min="" os_filter_max="" os_filter_lcid="" type="msi" installcompletemessage="" uninstallcompletemessage="" mustreboot="False" reboot_required="" must_reboot_required="False" failed_exec_command_continue="" allow_continue_on_error="False" default_continue_on_error="False" required_install="True" required_uninstall="True" selected_install="True" selected_uninstall="True" note="" processor_architecture_filter="x86,x64" status_installed="" status_notinstalled="" supports_install="True" supports_uninstall="True" show_progress_dialog="True" show_cab_dialog="True">
      <installedcheck path="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{183B99EC-EF7E-46AC-ACA0-28D06BEE1604}" fieldname="Version" fieldvalue="1" defaultvalue="False" fieldtype="REG_DWORD" comparison="exists" rootkey="HKEY_LOCAL_MACHINE" wowoption="NONE" type="check_registry_value" description="Installed Check" />
      <embedfile sourcefilepath="#APPPATH\MyProduct.msi" targetfilepath="#CABPATH\MyProduct.msi" />
    </component>

Jan 27, 2012 at 8:19 AM

After some diggin and conceptual understanding from the following link.. I managed to find out what is causing the problem which led to the solution.

Problem was because the bootstrapper was supplied with and admin credential <requireAdministrator> which inturn invoked the MSI installer using that same user context. That means that the installation was done for the admin instead of the user whom is invoking the bootstrapper. Since the MSI scope was per-user, there was an entry in the Add Remove Program of the 'admim' user instead of the user whom invoked the bootstrapper.

this link helped in understanding and solving the problem. might come in handy for others.

http://msdn.microsoft.com/en-us/magazine/cc163486.aspx

Note: If we embed the <asInvoker> in the bootstapper manifest, prereq such as dotnetfx4.0 Full will fail to install since it required elevated privileges