diff --git a/src/winetricks b/src/winetricks index a8d8942c8..48fdbecb8 100755 --- a/src/winetricks +++ b/src/winetricks @@ -19015,12 +19015,11 @@ load_remove_mono() "${WINE_ARCH}" reg delete "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5" /f || true "${WINE_ARCH}" reg delete "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4" /f || true - if grep --quiet --text "WINE_MONO_OVERRIDES" "${W_WINDIR_UNIX}/system32/mscoree.dll"; then - w_try rm -f "${W_WINDIR_UNIX}/system32/mscoree.dll" - fi - if grep --quiet --text "WINE_MONO_OVERRIDES" "${W_WINDIR_UNIX}/syswow64/mscoree.dll"; then - w_try rm -f "${W_WINDIR_UNIX}/syswow64/mscoree.dll" - fi + for mscoree_dll in "${W_SYSTEM32_DLLS}/mscoree.dll" "${W_SYSTEM64_DLLS}/mscoree.dll"; do + if [ -f "${mscoree_dll}" ] && grep --quiet --text "WINE_MONO_OVERRIDES" "${mscoree_dll}"; then + w_try rm -f "${mscoree_dll}" + fi + done elif [ -z "$1" ] || [ "$1" != "internal" ]; then w_warn "Mono does not appear to be installed." fi