Installing vcrun2019 changes Wine prefix Windows version
By default, Wine sets a prefix's Windows version to be Windows 10. Executing load_vcrun2019 correctly gets the current Windows version from winecfg, and stores it in variable w_store_winver. The issue occurs after load_ucrtbase2019 runs, when it completes variable w_restore_winver executes, it sets the prefix version to Windows 7 instead of the version set in variable w_store_winver.
Example (winetricks 20240105-next):
w_store_winver = win10 but variable w_restore_winver sets it to win7.
Using winetricks 20240105-next - sha256sum: 4abaf4ff7244cee16d6e72a8f3a295dc0f0c82a971b96d4f9c63e38484eec1a6 with wine-9.7 (Staging) and WINEARCH=win64
Executing w_do_call vcrun2019
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
Executing load_vcrun2019
Using native,builtin override for following DLLs: api-ms-win-crt-private-l1-1-0 api-ms-win-crt-conio-l1-1-0 api-ms-win-crt-heap-l1-1-0 api-ms-win-crt-locale-l1-1-0 api-ms-win-crt-math-l1-1-0 api-ms-win-crt-runtime-l
1-1-0 api-ms-win-crt-stdio-l1-1-0 api-ms-win-crt-time-l1-1-0 atl140 concrt140 msvcp140 msvcp140_1 msvcp140_2 msvcp140_atomic_wait msvcp140_codecvt_ids vcamp140 vccorlib140 vcomp140 vcruntime140
Executing /usr/bin/wine C:\windows\syswow64\regedit.exe /S C:\windows\Temp\override-dll.reg
Executing /usr/bin/wine64 C:\windows\regedit.exe /S C:\windows\Temp\override-dll.reg
grep: warning: stray \ before /
------------------------------------------------------
warning: Working around wine bug 50894 -- Working around failing wusa.exe lookup via C:\windows\SysNative
------------------------------------------------------
win10
Executing /usr/bin/wine winecfg -v winxp64
------------------------------------------------------
warning: Running /usr/bin/wineserver -w. This will hang until all wine processes in prefix=/test/prefix terminate
------------------------------------------------------
Executing cd /home/user/.cache/winetricks/vcrun2019
Executing /usr/bin/wine vc_redist.x86.exe /q
Using native,builtin override for following DLLs: vcruntime140_1
Executing /usr/bin/wine C:\windows\syswow64\regedit.exe /S C:\windows\Temp\override-dll.reg
Executing /usr/bin/wine64 C:\windows\regedit.exe /S C:\windows\Temp\override-dll.reg
grep: warning: stray \ before /
Executing /usr/bin/wine vc_redist.x64.exe /q
Executing w_do_call ucrtbase2019
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
Executing load_ucrtbase2019
Using native,builtin override for following DLLs: ucrtbase
Executing /usr/bin/wine C:\windows\syswow64\regedit.exe /S C:\windows\Temp\override-dll.reg
Executing /usr/bin/wine64 C:\windows\regedit.exe /S C:\windows\Temp\override-dll.reg
grep: warning: stray \ before /
Executing cabextract -q --directory=/test/prefix/dosdevices/c:/windows/temp/win32 /home/user/.cache/winetricks/ucrtbase2019/VC_redist.x86.exe -F a10
Executing cabextract -q --directory=/test/prefix/dosdevices/c:/windows/syswow64 /test/prefix/dosdevices/c:/windows/temp
/win32/a10 -F ucrtbase.dll
/test/prefix/dosdevices/c:/windows/temp/win32/a10: WARNING; possible 9136 extra bytes at end of file.
grep: warning: stray \ before /
Executing cabextract -q --directory=/test/prefix/dosdevices/c:/windows/temp/win64 /home/user/.cache/winetricks/ucrtbase2019/VC_redist.x64.exe -F a10
Executing cabextract -q --directory=/test/prefix/dosdevices/c:/windows/system32 /test/prefix/dosdevices/c:/windows/temp
/win64/a10 -F ucrtbase.dll
/test/prefix/dosdevices/c:/windows/temp/win64/a10: WARNING; possible 9152 extra bytes at end of file.
Executing /usr/bin/wine winecfg -v win7
As a workaround, you can install vcrun2022, which does not alter the prefix Windows version. Verb vcrun2022 includes the Visual C++ Redistributable Runtimes from 2015 to 2022.
In Winetricks, can the verbs vcrun2015, vcrun2017, and vcrun2019 be removed while keeping only vcrun2022? Or are these verbs retained for compatibility reasons?