[wix-users] ShowFileInUse in Bootstrapper... [P]

Steven Ogilvie Steven.Ogilvie at titus.com
Tue Sep 22 08:31:47 PDT 2015


Classification: Public
All I did was change:
hr = XmlGetAttributeNumber(pNode, L"ShowFilesInUse", &dwBool);
        if (S_FALSE == hr)
        {
            hr = S_OK;
        }
        else if (SUCCEEDED(hr))
        {
            m_fShowFilesInUse = 0 < dwBool;
        }
        BalExitOnFailure(hr, "Failed to get ShowFilesInUse value.");

Which worked J I did not get the FilesInUse dialog J

Now I have to test putting it back to ShowFilesInUse=yes to see if the dialog comes up, which worked I got the FilesInUse dialog pop up…

This fix works awesome,

Thanks,

Steve

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: September-22-15 10:49 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] ShowFileInUse in Bootstrapper... [P]

Steven,
  Can you verify my workaround worked for you?

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: Monday, September 21, 2015 5:28 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] ShowFileInUse in Bootstrapper... [P]

Classification: Public
Thanks for the info Jacob, here is the bug info:

Untriaged v3.10 burn 0	Assigned to No one	Updated 2015-09-21 @ 22:26	Opened 2015-09-21 @ 22:26 by sogilvie
Bug 4899 | return values of xmlutil functions are not being consistent...

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: September-21-15 6:14 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] ShowFileInUse in Bootstrapper... [P]

Please do log the bug though.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: Monday, September 21, 2015 5:13 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] ShowFileInUse in Bootstrapper... [P]

Classification: Public
Aha okay thank you!
For now I will just change the showfiles in use and rebuild

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: September-21-15 6:11 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] ShowFileInUse in Bootstrapper... [P]

No.


if (E_NOTFOUND == hr) <--- This compare.
        {
            hr = S_OK;
        }
else if (SUCCEEDED(hr))
        {
            ...
        }

To:

if (S_FALSE == hr) <--- This compare.
        {
            hr = S_OK;
        }
else if (SUCCEEDED(hr))
        {
            ...
        }

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: Monday, September 21, 2015 5:10 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] ShowFileInUse in Bootstrapper... [P]

Classification: Public
So change:

if (E_NOTFOUND == hr) <--- This compare.
        {
            hr = S_OK;
        }
else if (SUCCEEDED(hr))
        {
            ...
        }

To:

if (E_NOTFOUND == hr) <--- This compare.
        {
            hr = S_FALSE;
        }
else if (SUCCEEDED(hr))
        {
            ...
        }

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: September-21-15 6:07 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] ShowFileInUse in Bootstrapper... [P]

Steven,
  I think it's safe to say this is a bug, where the return values of the xmlutil functions aren't consistent.  The XmlGetAttributeEx returns E_NOTFOUND, but XmlGetAttribute returns S_FALSE if the attribute isn't found (and as such so does XmlGetAttributeNumber).

This bug has existed since WIX 3.8, but if you would log it, we can bring it up for discussion in tomorrow's meeting.


The short term fix, if you can build Wix, is to change E_NOTFOUND to S_FALSE for anything that calls XmlGetAttribute inside of WixStdBA.

if (E_NOTFOUND == hr) <--- This compare.
        {
            hr = S_OK;
        }
else if (SUCCEEDED(hr))
        {
            ...
        }
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: Monday, September 21, 2015 5:04 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] ShowFileInUse in Bootstrapper... [P]

Classification: Public
What would you suggest I do to fix this in the meantime?

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: September-21-15 5:55 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] ShowFileInUse in Bootstrapper... [P]

Since no is the default value, it would make sense for it to not be written to the manifest.


https://msdn.microsoft.com/en-us/library/ms767592(v=vs.85).aspx

If that documentation is correct...

Return Values
S_OK
The value returned if successful.
S_FALSE
The value when returning Null.
E_INVALIDARG
The value returned if the namedItem parameter is Null.

That leads me to believe that XmlGetAttributeNumber is returning S_FALSE not E_NOTFOUND.  In which case, it's turning on the files in use dialog because of the previous value being read in from the last option it found.


I sure hope I am reading the docs wrong, or this is a rather large and long standing bug.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: Monday, September 21, 2015 4:36 PM
To: WiX Toolset Users Mailing List
Subject: [wix-users] ShowFileInUse in Bootstrapper... [P]

Classification: Public
Okay interesting...

Looking at the code in  .\WIX_ToolSet_v3.10\src\ext\BalExtension\wixstdba\WixStandardBootstrapperApplication.cpp in the method:
ParseBootrapperApplicationDataFromXml

It is trying to read: 
hr = XmlGetAttributeNumber(pNode, L"ShowFilesInUse", &dwBool);
        if (E_NOTFOUND == hr)
        {
            hr = S_OK;
        }
        else if (SUCCEEDED(hr))
        {
            m_fShowFilesInUse = 0 < dwBool;
        }
        BalExitOnFailure(hr, "Failed to get ShowFilesInUse value.");

Looking at the .\.ba1\BootstrapperApplicationData.xml file that variable is not listed:
<WixStdbaOptions SuppressDowngradeFailure="1" SuppressRepair="1" ShowVersion="1" />

I don't think this variable is being read properly... (i.e. setting ShowFilesInUse="no")...

Can someone please see if this is an issue

Thanks,

Steve

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Steven Ogilvie
Sent: September-21-15 4:30 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] ShowFileInUse in Bootstrapper... 

Our main branch uses WiX 3.10 QA/Management do not like the "new" ShowFilesInUse dialog.
I have set ShowFilesInUse to "no" the dialog still pops up...

How do you TURN this feature OFF?

It was added by:
WixBuild: Version 3.10.0.1726
creativbox: WIXFEAT:4382 - Added files-in-use UI to WixStdBA

Thanks,

Steve

-----Original Message-----
From: Steven Ogilvie
Sent: September-21-15 8:41 AM
To: 'WiX Toolset Users Mailing List'
Subject: RE: [wix-users] ShowFileInUse in Bootstrapper
Importance: High

[Steven Ogilvie]
I would like some help with this please...

How do I turn OFF ShowFilesInUse, I do have ShowFilesInUse=no but the dialog still shows...

Steve

................

Hi Folks,

QA and Management are getting upset with the FileInUse dialog popping up in the Bootstrapper during our Client install.

Using WiX 3.10

I had "ShowFilesInUse="yes" so this morning I put 'ShowFilesInUse="no"' rebuilt my project and ran it.

During uninstall the FileInUse dialog still shows in the Boostrapper...How do I turn it off?
The MSI's are run silent during install/uninstall...
my bundle.wxs looks like:<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">      <Payload SourceFile="$(var.scSourcePath)\SideBanner.png" Compressed="yes" />      <Payload SourceFile="$(var.scSourcePath)\end-user license.png" Compressed="yes" />      <Payload SourceFile="$(var.scSourcePath)\Background.png" Compressed="yes" />      <bal:WixStandardBootstrapperApplication        SuppressOptionsUI="no"        LogoFile="$(var.resourcePath)\classification.png"        ThemeFile="$(var.SolutionDir)Include\HyperlinkTheme.xml"        LocalizationFile="$(var.SolutionDir)Include\HyperlinkTheme_ClientSuite.wxl"        LicenseFile="$(var.resourcePath)\CLIENT_SUITE_EULA_text.rtf"        ShowFilesInUse="no"        SuppressRepair="yes"        SuppressDowngradeFailure="yes"></bal:WixStandardBootstrapperApplication>    </BootstrapperApplicationRef>

my theme file is:<Page Name="FilesInUse">    <Image X="00" Y="00" Width="493" Height="58" ImageFile="Logo.png" Visible="no"/>    <Static X="0" Y="309" Width="495" Height="1" HexStyle="0x00000200L"/>    <Static X="0" Y="58" Width="495" Height="1" HexStyle="0x00000200L"/>    <Text X="11" Y="-11" Width="246" Height="17" FontId="4" DisablePrefix="yes">#(loc.InstallVersion)</Text>    <Text X="11" Y="60" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.FilesInUseHeader)</Text>    <Text X="11" Y="101" Width="-11" Height="34" FontId="3" DisablePrefix="yes">#(loc.FilesInUseLabel)</Text>    <Text Name="FilesInUseText"  X="11" Y="130" Width="-11" Height="-86" FontId="3" DisablePrefix="yes" HexStyle="0x0000C000"></Text>    <Button Name="FilesInUseCloseRadioButton" X="11" Y="-85" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseCloseRadioButton)</Button>    <Button Name="FilesInUseDontCloseRadioButton" X="11" Y="-65" W
 idth="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseDontCloseRadioButton)</Button>    <Button Name="FilesInUseOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FilesInUseOkButton)</Button>    <Button Name="FilesInUseCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FilesInUseCancelButton)</Button>  </Page>
The Bootstrapper log file does not have ShowFilesInUse...
Am I missing something?


 



 
This message has been marked as Public by Steven Ogilvie on September-21-15 5:35:44 PM.

The above classification labels were added to the message by TITUS Message Classification. For more information visit www.titus.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/

 



 
This message has been marked as Public by Steven Ogilvie on September-21-15 6:04:14 PM.

The above classification labels were added to the message by TITUS Message Classification. For more information visit www.titus.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/

 



 
This message has been marked as Public by Steven Ogilvie on September-21-15 6:10:08 PM.

The above classification labels were added to the message by TITUS Message Classification. For more information visit www.titus.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/

 



 
This message has been marked as Public by Steven Ogilvie on September-21-15 6:13:05 PM.

The above classification labels were added to the message by TITUS Message Classification. For more information visit www.titus.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/

 



 
This message has been marked as Public by Steven Ogilvie on September-21-15 6:27:58 PM.

The above classification labels were added to the message by TITUS Message Classification. For more information visit www.titus.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/

 



 
This message has been marked as Public by Steven Ogilvie on September-22-15 11:31:47 AM.

The above classification labels were added to the message by TITUS Message Classification. 
For more information visit www.titus.com.


More information about the wix-users mailing list