New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstall Bundle with PerUser package prompts for UAC under Win10 Apps & Features #5357

Closed
mgkeeley opened this Issue Jul 19, 2016 · 5 comments

Comments

Projects
None yet
5 participants
@mgkeeley

mgkeeley commented Jul 19, 2016

Wix 3.11.0.705
Windows 10

Background
I have a .MSI package that installs per-user. It only writes to the %LOCALAPPDATA% directory.

This .MSI file installs correctly, without UAC prompt on Windows 10; and I can see the entry in the Apps & Features panel.
If I uninstall the MSI from the Apps & Features panel, the package uninstalls correctly without the UAC prompt.

Issue
If I then wrap the .MSI into a bundle, I cannot uninstall it.
The bundle & package installs correctly, without UAC prompt.
Uninstalling from the Apps & Features panel prompts for UAC, and then the LOCALAPPDATA directory is incorrect during uninstallation.
Uninstalling from the legacy Programs & Features panel does work (no UAC prompt).

Expected Behaviour
The bundle should uninstall from the Apps & Features panel without the UAC prompt.

Related Information
I saw a possibly related bug #4857 that I also encountered, but this went away after upgrading to 3.11.0.705

Reproducing
See below a couple of simple wxs projects illustrating the issue.

The MyProduct msi has a progress-only UI and installs a single file to %LOCALAPPDATA%\My Company\My Product\Manual.txt

Build command:

candle.exe -sw1026 MyProduct.wxs 
light.exe -sw1076 -sw1079 MyProduct.wixobj -cultures:en-US
candle.exe bootstrapper.wxs -ext WixBalExtension -ext WixNetfxExtension.dll
light.exe bootstrapper.wixobj -ext WixBalExtension -ext WixNetfxExtension.dll

MyProduct.wxs:

<?xml version="1.0" encoding="Windows-1252"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="6f330b47-2577-43ad-9095-1861ca00000c" Name="MyProduct" Language="1033" Codepage="Windows-1252" Version="1.0.0.0" UpgradeCode="6f330b47-2577-43ad-9095-1861ba00000b" Manufacturer="My Company">
    <Package InstallerVersion="200" Compressed="yes" SummaryCodepage="Windows-1252" Languages="1033" InstallScope="perUser" />
    <Media Id="1" Cabinet="MyProduct.cab" EmbedCab="yes" />

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="LocalAppDataFolder" Name="LocalAppDataFolder">
        <Directory Id="LocalAppDataFolder.My_Company" Name="My Company">
          <Directory Id="INSTALLDIR" Name="My Product">

            <Component Id="Component.Manual.txt" Guid="6f330b47-2577-43ad-9095-18610885a52f">
              <File Id="Manual.txt" Source="Manual.txt" />
              <RemoveFolder Id="INSTALLDIR" On="uninstall" />

              <RegistryKey Root="HKCU" Key="Software\WixSharp\Used">
                <RegistryValue Value="0" Type="string" KeyPath="yes" />
              </RegistryKey>
            </Component>

          </Directory>

          <Component Id="LocalAppDataFolder.My_Company" Guid="6f330b47-2577-43ad-9095-1861a82d67e5">
            <RemoveFolder Id="LocalAppDataFolder.My_Company" On="uninstall" />

            <RegistryKey Root="HKCU" Key="Software\WixSharp\Used">
              <RegistryValue Value="0" Type="string" KeyPath="yes" />
            </RegistryKey>
          </Component>

        </Directory>
      </Directory>
    </Directory>

    <Feature Id="Complete" Title="Complete" Absent="allow" Level="1">
      <ComponentRef Id="Component.Manual.txt" />
      <ComponentRef Id="LocalAppDataFolder.My_Company" />
    </Feature>

  </Product>
</Wix>

bootstrapper.wxs:

<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
  <Bundle Name="My Product" DisableModify="yes" UpgradeCode="43b4a642-d3b8-4761-84ac-1d6bb0000008" Version="1.0.0.0" Manufacturer="My Company">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
      <bal:WixStandardBootstrapperApplication LicenseUrl=""/>
    </BootstrapperApplicationRef>
    <Chain>
      <MsiPackage Id="MyProductSetup" SourceFile="MyProduct.msi"/>
    </Chain>
  </Bundle>
</Wix>

Manual.txt:

This is the manual

@mgkeeley mgkeeley changed the title from Unisntall Bundle with PerUser package prompts for UAC under Win10 Apps & Features to Uninstall Bundle with PerUser package prompts for UAC under Win10 Apps & Features Jul 19, 2016

@mgkeeley

This comment has been minimized.

mgkeeley commented Jul 19, 2016

Occurs on both x86 and x64

@barnson barnson added the external label Jul 19, 2016

@barnson

This comment has been minimized.

Member

barnson commented Jul 19, 2016

The bundle is appropriately manifested and launches correctly from legacy ARP and the command line. So the problem is the new modern ARP, which appears to be blindly elevating .exe packages. It doesn't appear there's anything we can do in Burn; this is a Windows bug.

@barnson barnson closed this Jul 19, 2016

@n0sk

This comment has been minimized.

n0sk commented May 25, 2017

Are there any news on this? I seem to have the same problem.

@robmen

This comment has been minimized.

Member

robmen commented May 25, 2017

Not here. Windows doesn't track their bugs in our issue tracker.

@limpkin

This comment has been minimized.

limpkin commented Mar 17, 2018

same problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment