[wix-users] Some questions

William Fisher wfisher at summa.com
Tue Jul 18 12:38:18 PDT 2017


Sadly, that doesn't tell me anything I didn't know.  The problem is, this
MSI is the LAST thing to install for this bootstrapper (and should be the
first thing uninstalled).  The "other package" doesn't actually exist.  The
name (Where I had "Application Name" in the last message) is the name of
the installer itself.  I'll include the bundle.wxs (for the bootstrapper)
and the product.wxs from the MSI that's not being uninstalled below, edited
only to remove client information.  If I can get the bootstrapper to
recognize that the offending MSI isn't actually installed, I'd be
satisfied.  But there are no registry entries for that GUID, so...

product.wxs (Individual MSI that won't uninstall)

<?xml version="1.0" encoding="UTF-8"?>
<?include Includes\Variables.wxi?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:sql="http://schemas.microsoft.com/wix/SqlExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" >
<Product Id="*"
           Name="!(loc.ProductName)"
           Language="1033"
           Version="1.0.0.0"
           Manufacturer="!(loc.Manufacturer)"
           UpgradeCode="9f87f1dd-89ec-4979-bf25-9f0245004507">
<Package InstallerVersion="200"
             Compressed="yes"
             InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is
already installed." />
<Feature Id="SQLDatabase" Title="Application.Name.Database.Installer"
Level="1">
<ComponentRef Id="SQLDatabaseComponent" />
</Feature>
    <Media Id="1" />
    <Property Id="SQLServerName">(Local)</Property>
    <Property Id="SQLInstance">$(var.InstanceName)</Property>
    <Property Id="SQLDBName">ApplicationDB</Property>
    <Property Id="SQLUsername">sa</Property>
    <Property Id="SQLPassword">Password1!</Property>
</Product>
<Fragment>
 <util:User Id="SQLUser"
            Name="[SQLUsername]"
            Password="[SQLPassword]" />
 <Binary Id="CreateSQL" SourceFile="output\DBCreate.sql" />
 <Directory Id="TARGETDIR" Name="SourceDir">
      <Component Id="SQLDatabaseComponent"
Guid="{D1B62CE5-FFEE-43E9-A298-C7DAB06D7D38}">
        <sql:SqlDatabase Id="ApplicationDB"
                         Server="[SQLServerName]"
                         Instance="[SQLInstance]"
                         Database="[SQLDBName]"
                         User="SQLUser"
                         CreateOnInstall="yes"
                         DropOnUninstall="yes">
          <sql:SqlScript Id="CreateSQLScript" BinaryKey="CreateSQL"
ExecuteOnInstall="yes"/>
        </sql:SqlDatabase>
        <RegistryKey Root="HKLM"
                     Key="Software\Client\Application">
          <RegistryValue Type="integer" Name="Installed" Value="1"
KeyPath="yes"/>
          <RegistryValue Type="string" Value="Default Value"/>
        </RegistryKey>
      </Component>
  </Directory>
</Fragment>
</Wix>

bundle.wxs (Bootstrapper)

3:36 PM 7/18/2017<?xml version="1.0" encoding="UTF-8"?>
<?include Includes/ApplicationVariables.wxi ?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<Bundle
    Name="$(var.ProductName)"
    Version="$(var.VersionNumber)"
    Manufacturer="$(var.ManufacturerName)"
    UpgradeCode="64857b79-4f2d-48ef-ae8a-08bab1d77294"
    Compressed="yes">
    <BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
      <PayloadGroupRef Id="InstallerPayload" />
    </BootstrapperApplicationRef>
 <util:User Id="SQLsa"
            Name="[sa]"
            Password="[Password1!]" />
<Chain>
<PackageGroupRef Id="CertificatePackage"/>
      <PackageGroupRef Id="NetFx462" After="CertificatePackage"/>
      <PackageGroupRef Id="SQLServerExpress2014_64Bit"/>
 <PackageGroupRef Id="SQLServerExpress2014_32Bit"/>
      <PackageGroupRef Id="Application64Bit"/>
      <PackageGroupRef Id="Application32Bit"/>
      <PackageGroupRef Id="Client.Application.Database.Installer"/>
</Chain>
</Bundle>
  <Fragment>
    <util:RegistrySearch
      Id="NETFRAMEWORK462"
      Variable="NETFRAMEWORK462"
      Root="HKLM"
      Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
      Value="Install"
      Result="value"/>
    <WixVariable Id="WixMbaPrereqPackageId" Value="NetFx462Redist" />
    <WixVariable Id="WixMbaPrereqLicenseUrl" Value="
https://msdn.microsoft.com/en-us/library/ms994405.aspx" Overridable="yes" />
    <PackageGroup Id="NetFx462">
      <ExePackage Id="NetFx462"
                  Cache="no"
                  Compressed="yes"
                  PerMachine="yes"
                  Permanent="yes"
                  Vital="yes"
                  Name="NDP462-KB3151800-x86-x64-AllOS-ENU.exe"
                  SourceFile="redist\NDP462-KB3151800-x86-x64-AllOS-ENU.exe"
                  DetectCondition="NETFRAMEWORK462"
                  InstallCommand="/q /norestart"/>
    </PackageGroup>
  </Fragment>
  <Fragment>
    <PayloadGroup Id="InstallerPayload">
      <!-- TODO: determine relative sources to prevent errors when moving
the solution -->
      <Payload SourceFile="C:\\Users\\310284944\\Documents\\Visual Studio
2015\\Projects\\Client.Application.Setup\\ApplicationBootstrapper\\bin\\Debug\\ApplicationBootstrapper.dll"/>
      <Payload SourceFile="C:\\Users\\310284944\\Documents\\Visual Studio
2015\\Projects\\Client.Application.Setup\\ApplicationBootstrapper\\BootstrapperCore.config"/>
      <Payload SourceFile="C:\\Users\\310284944\\Documents\\Visual Studio
2015\\Projects\\Client.Application.Setup\\ApplicationBootstrapper\\bin\\Debug\\Microsoft.Deployment.WindowsInstaller.dll"/>
      <Payload SourceFile="C:\\Users\\310284944\\Documents\\Visual Studio
2015\\Projects\\Client.Application.Setup\\Client.Application.Installer.UserInterface\\bin\\Debug\\Client.Application.Installer.UserInterface.exe"/>
      <Payload Name="redist\\NDP462-KB3151800-x86-x64-AllOS-ENU.exe"
               SourceFile="C:\\Users\\310284944\\documents\\visual studio
2015\\Projects\\Client.Application.Setup\\Client.Application.Setup\\redist\\NDP462-KB3151800-x86-x64-AllOS-ENU.exe"/>
    </PayloadGroup>
  </Fragment>
  <Fragment>
    <PackageGroup Id="CertificatePackage">
      <MsiPackage Id="CertificatePackage"
                  Name="Client.Application.Certificate.Installer"
                  Compressed="yes"
                  Visible="no"
                  SourceFile="C:\\Users\\310284944\\Documents\\Visual
Studio
2015\\Projects\\Client.Application.Setup\\Client.Application.Certificate.Installer\\bin\\Release\\Client.Application.Certificate.Installer.msi"/>
    </PackageGroup>
  </Fragment>
  <Fragment>
    <util:RegistrySearch
      Id='SearchForSQLServerExpress64'
      Variable="ISSQLSERVER64INSTALLED"
      Result="exists"
      Root="HKLM"
      Key="SOFTWARE\Microsoft\Microsoft SQL
Server\MSSQL12.$(var.InstanceName)"
      Win64="yes" />
    <PackageGroup Id="SQLServerExpress2014_64Bit">
      <ExePackage Compressed="yes"
                  PerMachine="yes"
                  Cache="yes"
                  Vital="yes"
                  Permanent="no"
                  InstallCommand='/ACTION=Install /Q
/IACCEPTSQLSERVERLICENSETERMS /FEATURES=SQLEngine
/INSTANCENAME=$(var.InstanceName)
/SQLSYSADMINACCOUNTS=BUILTIN\Administrators /SECURITYMODE=SQL
/SAPWD="Password1!" /SkipRules=RebootRequiredCheck'
                  UninstallCommand='/ACTION=Uninstall /Q
/FEATURES=SQLEngine /INSTANCENAME=$(var.InstanceName)'
                  SourceFile='redist\SQLEXPR_x64_ENU.exe'
                  Name="redist\SQLEXPR_x64_ENU.exe"
                  DetectCondition="Installed OR ISSQLSERVER64INSTALLED"
                  InstallCondition="VersionNT64">
        <ExitCode Behavior="forceReboot"/>
      </ExePackage>
    </PackageGroup>
  </Fragment>
  <Fragment>
    <util:RegistrySearch
      Id='SearchForSQLServerExpress32'
      Variable="ISSQLSERVER32INSTALLED"
      Result="exists"
      Root="HKLM"
      Key="SOFTWARE\Microsoft\Microsoft SQL
Server\MSSQL12.$(var.InstanceName)"
      Win64="no" />
    <PackageGroup Id="SQLServerExpress2014_32Bit">
      <ExePackage Compressed="yes"
                  PerMachine="yes"
                  Cache="yes"
                  Vital="yes"
                  Permanent="no"
                  InstallCommand='/ACTION=Install /Q
/IACCEPTSQLSERVERLICENSETERMS /FEATURES=SQLEngine
/INSTANCENAME=$(var.InstanceName)
/SQLSYSADMINACCOUNTS=BUILTIN\Administrators /SECURITYMODE=SQL
/SAPWD="Password1!" /SkipRules=RebootRequiredCheck'
                  UninstallCommand='/ACTION=Uninstall /Q
/FEATURES=SQLEngine /INSTANCENAME=$(var.InstanceName)'
                  SourceFile='redist\SQLEXPR_x86_ENU.exe'
                  Name="redist\SQLEXPR_x86_ENU.exe"
                  DetectCondition="Installed OR ISSQLSERVER32INSTALLED"
                  InstallCondition="NOT VersionNT64">
        <ExitCode Behavior="forceReboot"/>
      </ExePackage>
    </PackageGroup>
  </Fragment>
  <Fragment>
    <PackageGroup Id="Application64Bit">
      <MsiPackage
        Name="Client.Application.Installer64"
        Compressed="yes"
        SourceFile="C:\Users\310284944\Documents\Visual Studio
2015\Projects\Client.Application.Setup\Client.Application.Installer64\bin\Debug\en-US\Client.Application.Installer64.msi"
        InstallCondition="VersionNT64" />
    </PackageGroup>
  </Fragment>
  <Fragment>
    <PackageGroup Id="Application32Bit">
      <MsiPackage
        Name="Client.Application.Installer32"
        Compressed="yes"
        SourceFile="C:\Users\310284944\Documents\Visual Studio
2015\Projects\Client.Application.Setup\Client.Application.Installer32\bin\Debug\en-US\Client.Application.Installer32.msi"
        InstallCondition="NOT VersionNT64" />
    </PackageGroup>
  </Fragment>
  <Fragment>
    <!-- Placed here as this fragment is guaranteed to be included.  The
Icon and Property can
         be placed anywhere in the WIX project. -->
    <Icon Id="shield.ico" SourceFile="Resources\Client_logo.ico"/>
    <Property Id="ARPPRODUCTICON" Value="shield.ico"/>
    <PackageGroup Id="Client.Application.Database.Installer">
      <MsiPackage
        Name="Client.Application.Database.Installer"
        Compressed="yes"
        SourceFile="C:\Users\310284944\Documents\Visual Studio
2015\Projects\Client.Application.Setup\Client.Application.Database.Installer\bin\Debug\en-us\Client.Application.Database.Installer.msi"/>
    </PackageGroup>
  </Fragment>
</Wix>


On Tue, Jul 18, 2017 at 3:27 PM Hoover, Jacob <Jacob.Hoover at greenheck.com>
wrote:

> You'd have to provide some more info on your bundle authoring,
> specifically around this MSI that isn't uninstalling and any dependency
> authoring you've done. The logs indicate the engine deciding to not
> uninstall this MSI because another package depends upon it.  So what you
> should be looking at is the other package, and see what it's plan looks
> like.
>
> If you had a bad bundle before and you need to manually remove the
> leftovers, you can manually uninstall the MSI's from the command line.
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of William Fisher
> Sent: Tuesday, July 18, 2017 2:04 PM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] Some questions
>
> More on this installer:
>
> I have an MSI that's installed as part of my bootstrapper.  Installation
> seems to go fine, but when I try to uninstall, it says:
>
> [23BC:2900][2017-07-18T11:14:36]w327: Will not uninstall package:
> Application.Name.Database.Installer, found dependents: 1
> [23BC:2900][2017-07-18T11:14:36]w328: Found dependent:
> {5c31825e-d40e-44ce-8fcb-1d9656eee9fb}, name: Application Name
>
> In this question:
>
> https://stackoverflow.com/questions/12828514/wix-burn-issue-uninstall-fails-saying-found-dependent
> Brian Johnson says that it's because I have stale data left over in the
> registry.  This very well may be the case, but when I do a search in the
> registry for that GUID, regedit churns along for a while and (so far)
> returns no results - it's still running minutes later, it may have crashed
> and just not informed me of that.
>
> Has anyone solved this problem?  I can't install now, because the database
> installer is the thing that loads the SQL into SQL Server, and since I
> don't have any tables, the app opens but doesn't save or load any data in
> the DB and crashes when I try.
>
> Thanks for any info.
>
>
> On Mon, Jul 17, 2017 at 10:30 AM William Fisher <wfisher at summa.com> wrote:
>
> > Nir Bar and Habib,
> >
> > Thanks very much for the input.  I guess I didn't see the link to the
> > supportedRuntime values somehow (definitely not that I'm frustrated,
> > not that at all).  I'm going to look at the mbapreq.thm and
> > mbapreq.wxl to see if I can't just completely co-opt it.  I feel like
> > I'm doing something wrong, because this is a fairly simple set of
> > tasks.  Install a certificate if it's Win7SP1, run .NET installation,
> > run SQL Server installation, reboot, run app installation, run db schema
> installation.
> >
> > I'll run some tests, but I feel like I had <supportedRuntime
> > version="v2.0.50727"/><supportedRuntime version="v4.0"/> there, but it
> > didn't work right.  I'm willing to accept any version of 4, as long as
> > the installer runs (because I can use the redistributable to install
> > the ACTUAL version I need in my wxs).
> >
> > On Mon, Jul 17, 2017 at 8:13 AM Nir Bar <nir.bar at panel-sw.com> wrote:
> >
> >> To change the default .NET bootstrapping UI, customize mbapreq.thm,
> >> mbapreq.wxl.You can find the default files in WiX source code in
> >> src\ext\BalExtension\wixstdba\Resources folder
> >>
> >>
> >> You can see valid values for supportedRuntime elements in
> >> https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file
> >> -schema/startup/supportedruntime-element
> >>
> >>
> >> P.S
> >> Habib- thank you for the warm words.
> >>
> >>
> >>
> >>
> >>
> >> --Independent WiX Expert. Creator of- https://JetBA.net - Native and
> >> WPF WiX BootstrapperApplication Frameworks
> >>
> >>
> >>
> >>
> >>
> >>
> >> ____________________________________________________________________
> >> WiX Toolset Users Mailing List provided by FireGiant
> >> http://www.firegiant.com/
> >>
> > --
> > Bill Fisher   |  Technical Consultant
> > [ *m* ] 412.427.9804 <(412)%20427-9804> <(412)%20427-9804>
> wfisher at summa.com
> > [image: [ l ]] billfishersumma   <
> https://linkedin.com/in/billfishersumma>
> > 611 William Penn Place
> > Pittsburgh, PA 15219
> > summa.com <http://www.summa.com/> [image: Summa]
> > <http://www.summa.com/>
> >
> --
> Bill Fisher   |  Technical Consultant
> [ *m* ] 412.427.9804 <(412)%20427-9804>
> wfisher at summa.com
> [image: [ l ]] billfishersumma   <https://linkedin.com/in/billfishersumma>
> 611 William Penn Place
> Pittsburgh, PA 15219
> summa.com <http://www.summa.com/> [image: Summa] <http://www.summa.com/>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
-- 
Bill Fisher   |  Technical Consultant
[ *m* ] 412.427.9804
wfisher at summa.com
[image: [ l ]] billfishersumma   <https://linkedin.com/in/billfishersumma>
611 William Penn Place
Pittsburgh, PA 15219
summa.com <http://www.summa.com/> [image: Summa] <http://www.summa.com/>


More information about the wix-users mailing list