valinet / Win11DisableRoundedCorners

A simple utility that cold patches dwm (uDWM.dll) in order to disable window rounded corners in Windows 11
GNU General Public License v2.0
830 stars 41 forks source link

Interferes with SFC /SCANNOW #4

Closed IsraelNS902 closed 3 years ago

IsraelNS902 commented 3 years ago

If you're to run the sfc /scannow command in the command prompt or terminal with the modified uDWM.dll installed it will be detected as a corrupted file, and the original uDWM.dll will automatically be restored on the next system start up- now when you try disable the round corners again the prompt outputs an error that states it failed to restore.

valinet commented 3 years ago

Seems pretty logical to me. May I ask what your proposal for tackling the issue is?

IsraelNS902 commented 3 years ago

Seems pretty logical to me. May I ask what your proposal for tackling the issue is?

Is it possible to trigger an event at startup or login that would detect if uDWM.dll is original or modified, if original then automatically replace with the modified file?

Personally I use sfc /scannow quite frequently so it is fairly annoying.

valinet commented 3 years ago

How do you detect if uDWM.dll is original or modified? What makes it original? Maybe an unbroken digital signature, let's say...

Anyway, after sfc /scannow, just delete C:\Windows\System32\uDWMm.dll and then the patcher works again...

To be honest, I don't even understand what the problem is... first of all, download the latest version.

Second of all, if I have some uDWM.dll (let's say it is the fixed one from sfc /scannow) and some file named uDWM_win11drc.bak (the backup for also a good uDWM.dll) in C:\Windows\System32 and run the patcher, it simply restores a good working original uDWM.dll with rounded corners. The next time you run the patcher again, it restores the square corners. So, what is the problem, it works fine, I think...

Anyway, if you want to check if uDWM.dll is original and if it is, run the patcher again, use something like this batch script (make sure to run it elevated; to do that at startup without an UAC prompt, set a task scheduler, for example, and check "Run with highest priviledges"):

@echo off
powershell "EXIT $((Get-AuthenticodeSignature C:\Windows\System32\uDWM.dll).Status -eq 'Valid')"
IF NOT ERRORLEVEL 1 GOTO no_error
del /Y C:\Windows\System32\uDWM_win11drc.dll
Win11DisableOrRestoreRoundedCorners.exe
:no_error

Other than this, I don't know what else to say...