https://bugs.winehq.org/show_bug.cgi?id=35809
Bug ID: 35809 Summary: Avoid deletion of precious (empty) folders such as '%USERPROFILE%\Application Data' during MSI product upgrades/uninstalls Product: Wine Version: 1.7.14 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: tools Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net
Hello folks,
found this while investigating some issues with Aeria Game Launcher (https://www.aeriagames.com/playnow/ignite).
Aeria requires .NET Framework 3.5 installed. After applying 'wintricks -q dotnet35' recipe to a fresh 32-bit WINEPREFIX the 'Aeria Ignite' installer silently fails.
The reason is that some folders such as '%USERPROFILE%\Application Data' are completely missing and the installer fails to put some files below that.
Those folders are created during WINEPREFIX creation (wineboot). Deletion afterwards won't let them get recreated (prefix update).
Further investigation reveals this happens during .NET Framework service pack recipe runs where products to be upgraded are uninstalled (expected, by design).
Example: .NET Framework 2.0 -> .NET Framework 2.0 SP1
--- snip --- ... 0028:Call KERNEL32.CreateProcessW(00000000,0171b210 L"msiexec /i {7131646D-CD3C-40F4-97B9-CD9E4E6262EF} REMOVE=ALL",00000000,00000000,00000000,00000000,00000000,00000000,0033d0d8,0033d0c8) ret=7dac3509 ... 008d:Call KERNEL32.__wine_kernel_init() ret=7bc5a3aa 0028:Ret KERNEL32.CreateProcessW() retval=00000001 ret=7dac3509 ... 008d:trace:msi:ACTION_PerformUIAction Performing action (L"RemoveFiles") ... 008d:trace:msi:ACTION_PerformUIAction Performing action (L"RemoveFolders") ... <*** attempted removal of lots of folders, even precious ones ***> ... 008d:trace:msi:ACTION_PerformUIAction Performing action (L"CreateFolders") ... 008d:trace:msi:ACTION_PerformUIAction Performing action (L"InstallFiles") ... 008d:trace:msi:ACTION_PerformUIAction Performing action (L"PublishProduct") ... 008d:trace:msi:ACTION_PerformUIAction Performing action (L"InstallFinalize") ... 008d:Call msi.MsiConfigureProductExW(00139a96 L"{7131646D-CD3C-40F4-97B9-CD9E4E6262EF}",00000000,00000005,00136340 L" REMOVE=ALL") ret=7edefa60 008d:Call KERNEL32.DeleteFileW(00159bd0 L"C:\windows\Installer\14bc.msi") ret=7ed19d6f 008d:Ret KERNEL32.DeleteFileW() retval=00000001 ret=7ed19d6f ... 008d:Ret msi.MsiConfigureProductExW() retval=00000000 ret=7edefa60 008d:Call KERNEL32.ExitProcess(00000000) ret=7edf0282 ... --- snip ---
I filtered only the successful deletions (= folder was empty):
--- snip --- $ grep -B1 "KERNEL32.RemoveDirectoryW() retval=00000001" log.txt ... 0028:Call KERNEL32.RemoveDirectoryW(0066d2e0 L"C:\users\focht\Temp\testdir.dir") ret=3ab16b39 0028:Ret KERNEL32.RemoveDirectoryW() retval=00000001 ret=3ab16b39 -- 0028:Call KERNEL32.RemoveDirectoryW(00681970 L"C:\users\focht\Temp\Microsoft .NET Framework 3.5") ret=3ab1709a 0028:Ret KERNEL32.RemoveDirectoryW() retval=00000001 ret=3ab1709a -- 008d:Call KERNEL32.RemoveDirectoryW(0057e808 L"C:\users\focht\Application Data\") ret=7ecfd3d8 008d:Ret KERNEL32.RemoveDirectoryW() retval=00000001 ret=7ecfd3d8 -- 008d:Call KERNEL32.RemoveDirectoryW(00176ee8 L"C:\users\focht\Start Menu\Programs\Administrative Tools\") ret=7ecfd3d8 008d:Ret KERNEL32.RemoveDirectoryW() retval=00000001 ret=7ecfd3d8 -- 008d:Call KERNEL32.RemoveDirectoryW(005c70e8 L"C:\windows\Microsoft.NET\Framework\v2.0.50727\Microsoft .NET Framework 2.0\") ret=7ecfd3d8 008d:Ret KERNEL32.RemoveDirectoryW() retval=00000001 ret=7ecfd3d8 -- 008d:Call KERNEL32.RemoveDirectoryW(005c5178 L"C:\users\focht\Local Settings\Application Data\") ret=7ecfd3d8 008d:Ret KERNEL32.RemoveDirectoryW() retval=00000001 ret=7ecfd3d8 -- 008d:Call KERNEL32.RemoveDirectoryW(005c4938 L"C:\windows\PCHEALTH\ERRORREP\QHEADLES\") ret=7ecbd63d 008d:Ret KERNEL32.RemoveDirectoryW() retval=00000001 ret=7ecbd63d 008d:Call KERNEL32.RemoveDirectoryW(005c4b50 L"C:\windows\PCHEALTH\ERRORREP\QSIGNOFF\") ret=7ecbd63d 008d:Ret KERNEL32.RemoveDirectoryW() retval=00000001 ret=7ecbd63d 008d:Call KERNEL32.RemoveDirectoryW(005c4ab0 L"C:\windows\PCHEALTH\ERRORREP\") ret=7ecbd63d 008d:Ret KERNEL32.RemoveDirectoryW() retval=00000001 ret=7ecbd63d 008d:Call KERNEL32.RemoveDirectoryW(005c42f8 L"C:\windows\PCHEALTH\") ret=7ecbd63d 008d:Ret KERNEL32.RemoveDirectoryW() retval=00000001 ret=7ecbd63d -- 0028:Call KERNEL32.RemoveDirectoryW(0033de50 L"C:\users\focht\Temp\IXP04D49.tmp") ret=3a1047e9 0028:Ret KERNEL32.RemoveDirectoryW() retval=00000001 ret=3a1047e9 --- snip ---
Some folders are essential for many installers/apps. Deletion will cause subtle problems on further software installations (the actual apps) or at run time.
Especially true for:
'%USERPROFILE%\Application Data' '%USERPROFILE%\Local Settings\Application Data'
Those are precious and need to be preserved. On Windows this scenario never happens because there always exist dozen of subfolders below by default.
A quick fix would be the creation of (empty) subfolder below, for example 'Microsoft' which is present on all Windows systems by default. This prevents the deletion of the parent.
Another option is to fix bugs like bug 34910 which needs '%USERPROFILE%\Application Data\Microsoft\Windows\Themes\' folder present, which would automatically thwart the folder deletion attempt.
Regards
https://bugs.winehq.org/show_bug.cgi?id=35809
--- Comment #1 from Austin English austinenglish@gmail.com --- https://source.winehq.org/patches/data/103283 https://source.winehq.org/patches/data/103284
https://bugs.winehq.org/show_bug.cgi?id=35809
Erich Hoover erich.e.hoover@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |erich.e.hoover@gmail.com
--- Comment #2 from Erich Hoover erich.e.hoover@gmail.com --- Should I mark Bug #33207 as a duplicate of this?
https://bugs.winehq.org/show_bug.cgi?id=35809
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello Erich,
well *I* basically created a dupe here after reading the bug report. Daniel suggested the same, creating placeholder folder below.
It's unfortunate that bug 33207 went under the radar for so long ... maybe the summary could have been reworded a bit to reflect the real issue. As already stated in both bugs - the underlying reason is that _any_ .NET service pack install causes the breakage which is a prerequisite for many apps nowadays (2.0sp1, 2.0sp2., 3.0, 3.0sp1, 3.5, 3.5sp1).
I don't mind if you resolve my bug as dupe of yours or the other way around.
If your bug stays, consider changing the summary and component (it's neither shell nor msi bug).
Regards
https://bugs.winehq.org/show_bug.cgi?id=35809
--- Comment #4 from Erich Hoover erich.e.hoover@gmail.com --- *** Bug 33207 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=35809
--- Comment #5 from Erich Hoover erich.e.hoover@gmail.com --- (In reply to Anastasius Focht from comment #3)
... I don't mind if you resolve my bug as dupe of yours or the other way around. ...
Yours has a lot more information, I neglected to put the time into the other one to figure out a proper solution. Thanks for putting in the effort to getting this figured out!
https://bugs.winehq.org/show_bug.cgi?id=35809
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |23601
--- Comment #6 from Anastasius Focht focht@gmx.net --- Hello folks,
bug 23601 (CSIDL_LOCAL_APPDATA\Microsoft) is also a good example/justification for putting a 'Microsoft' folder below both.
Regards
https://bugs.winehq.org/show_bug.cgi?id=35809
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |5b5556308bdde37617e5dfa9557 | |2e2cfd973ff2d Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit http://source.winehq.org/git/wine.git/commitdiff/5b5556308bdde37617e5dfa9557...
Thanks Austin
Regards
https://bugs.winehq.org/show_bug.cgi?id=35809
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.16.