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
Files-In-Use checking picks up files that correctly handled by the uninstall #4917
Comments
WixStdBA is just showing what MSI sends for files-in-use messages. Do you have ServiceControl authored correctly? Do you get in-use messages in an .msi not in a bundle? We'll open the feature for whitelisting.
|
Do you have ServiceControl authored correctly? `
The service is stopped/removed and the exe file delete successfully by the uninstall process. Thanks, Antony
|
Oh yes, I tripped into this as well this week and spent almost a full day reading docs and checking out samples. In the end, the solution is 🥁 to reorder the The following does not work, as reported by antfurnwix, i.e. one sees the dreaded Files-In-Use dialog:
Whereas it works fine after simply swapping the lines, i.e. MSI detects the situation correctly and does not show the Files-In-Use dialog:
It seems to me that MSI internally just checks the Stop value in the first row it finds for the respective service, and it does not check all rows. As this also affects standard MSIs and is not related to the bootstrapper application at all, I think the label WixStdBA should be removed from this issue. Can think of the following possible approaches to address it:
Your call, @rseanhall and friends 😉 |
Note: We'll triage it but if no one is willing to pick it up and do the work, it's likely to just go back 'up for grabs'. |
Makes sense. Especially with "up for grabs", some pointer or hint on how you'd want it to be addressed would be nice. |
If it's really ordering of |
@barnson Fully agree that it's not WixStdBA, see my earlier comment:
In fact, the original report did not even mention WixStdBA, the bug/behavior just surfaced there it seems. So the label is assigned incorrectly and should be removed. Not sure a new issue really helps? |
@dallmair - are you interested in working on this issue? We think it would be straightforward to order ServiceControl rows in CreateIdtFileCommand and a runtime test could prove the behavior. |
Always up for a new challenge, but cannot promise any specific time commitment. Hmm, var table = Data.Tables["ServiceControl"];
var rows = table.Rows.ToList();
rows.Sort(new ServiceControlRowComparer());
table.Rows.Clear();
foreach (var row in rows)
{
table.Rows.Add(row);
} This just reorders the rows in the IR, and keeps all references intact (no duplication of table or row instances). The |
No time commitment needed; we're all volunteers. Late in the pipeline is a goal, as without any kind of column to control ordering, there are no guarantees. That said, inside |
FYI: Starting a PR with a test demonstrating the end goal can be incredibly useful. It can get everyone on the same page, and as the ball is already rolling towards an agreed-upon solution, it makes it a lot easier to help with the final bit of code. |
PS: @dallmair thanks for being willing to look at this. This isn't a fix that would probably bubble up high on our list for a long time. |
Hi, The new WIX 3.10 feature that checks for files that are in use while uninstalling is a great new feature, one we wish to take full advantage of.
However, we have found an issue with the current implementation which means we can not use it :-(
[ The fact we can't switch it off currently is a whole other story, for which I've raised issue http://wixtoolset.org/issues/4916/ ]
For our product, we have a Windows service that needs to be running the for the life of the product/install. We create and start the service as part of the install, using the standard WIX function. This same functionality also handles the stopping and removal of our Windows service upon uninstall. This functionality is in one of four msi's that make up our product installation, all wrapped up by a standard burn bootstrapper exe.
The issue is that the files-in-use check flags up our Windows service exe file, which is off course running and in-use, durring the uninstall sequence. As far as I can workout, there is no way to tell the files-in-use check to ignore files that are going to be handled correctly by the installer during the uninstall.
At the very minimum, there needs to be a way of setting some sort of exclusion list for the files-in-use checking algorithm.
A more generic solution would understand that some product files are allowed to be in-use at the beginning of uninstall because the installer logic already deals with those files correctly - as in the case with Windows services.
Regards, Antony
The text was updated successfully, but these errors were encountered: