@echo off setlocal :: require administrator net session >nul 2>&1 || exit /b 1 set "dir=C:\Program Files\StartAllBack" set "dll=%dir%\StartAllBackX64.dll" set "bak=%dir%\StartAllBackX64-original.dll" set "tmp=%temp%\StartAllBackX64.dll" if not exist "%dll%" exit /b 1 if exist "%bak%" exit /b 1 :: prepare patched copy copy /y "%dll%" "%tmp%" >nul || exit /b 1 :: apply byte patch powershell -NoProfile -Command ^ "$p='%tmp%';" ^ "$b=[IO.File]::ReadAllBytes($p);" ^ "$s=[byte[]](0x48,0x89,0x5C,0x24,0x18,0x57,0x48,0x83,0xEC,0x30,0x48,0x8D,0x4C,0x24,0x48);" ^ "$i=-1;" ^ "for($x=0;$x -le $b.Length-$s.Length;$x++){" ^ "$ok=$true;" ^ "for($j=0;$j -lt $s.Length;$j++){if($b[$x+$j] -ne $s[$j]){$ok=$false;break}};" ^ "if($ok){$i=$x;break}};" ^ "if($i -lt 0){exit 1};" ^ "$b[$i]=0x31;$b[$i+1]=0xC0;$b[$i+2]=0xC3;" ^ "[IO.File]::WriteAllBytes($p,$b)" if errorlevel 1 ( del "%tmp%" >nul 2>&1 exit /b 1 ) :: backup and replace original ren "%dll%" "StartAllBackX64-original.dll" || ( del "%tmp%" >nul 2>&1 exit /b 1 ) move /y "%tmp%" "%dll%" >nul || ( ren "%bak%" "StartAllBackX64.dll" exit /b 1 ) :: restart explorer taskkill /f /im explorer.exe >nul 2>&1 start explorer.exe pause