Skip to content

Instantly share code, notes, and snippets.

@PureOcean
PureOcean / ExplorerPatcher_Updater.bat
Last active October 20, 2022 15:30
These commands automatically downloads and installs ExplorerPatcher the latest pre-prelease version.
@echo off
cd /d "%~dp0"
ECHO.
ECHO ::: ExplorerPatcher Updater ::: by PureOcean (2022-10-14+20)
ECHO.
ECHO Detecting ExplorerPatcher's latest version...
FOR /F "usebackq tokens=*" %%A in (`powershell -c "$ProgressPreference = 'SilentlyContinue'; (Invoke-WebRequest 'https://api.github.com/repos/valinet/ExplorerPatcher/releases' | ConvertFrom-Json)[0].assets | Select-Object -Property browser_download_url | Format-Table -HideTableHeaders"`) DO set ExplorerPatcherURL=%%A
FOR /F "tokens=7 delims=/_" %%A in ("%ExplorerPatcherURL%") Do set ExplorerPatcherVersion=%%A
@PureOcean
PureOcean / RemuxKeepingTheDate.bat
Last active April 24, 2022 01:43
MKVToolnix doesn't support remux the output file as the same date as the original input file. This script sets the output file date according to original date of the input file.
@echo off
cd /d "%~dp0"
:: Unfortunately, MKVToolnix doesn't support remux the output file as the same date as the original input file.
:: This script sets the output file date according to original date of the input file. How does it work?
:: It works by selecting one or many files and dragging and dropping them onto this script.
:: Coded by PureOcean (2022-04-23+24)
:: Thanks to the commands: https://github.com/gus33000/ESD-Decrypter/blob/master/bin/Rebuild-ISO.ps1#L190=
set "MKVToolNixPath=D:\Program\MKVToolNix"
@PureOcean
PureOcean / GDI_Font_Rendering.bat
Last active March 16, 2022 16:07
"Standart Font Smotthing" for Windows (Disable Cleartype, Enable GDI font rendering)
@echo off
:: Enable the "Standart Font Smoothing" instead of ClearType
Reg.exe add "HKCU\Control Panel\Desktop" /v "FontSmoothing" /t REG_SZ /d "2" /f
Reg.exe add "HKCU\Control Panel\Desktop" /v "FontSmoothingType" /t REG_DWORD /d "1" /f
Reg.exe add "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v "FontSmoothing" /t REG_SZ /d "2" /f
Reg.exe add "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v "FontSmoothingType" /t REG_DWORD /d "1" /f
:: The anti-aliased Segoe UI system font is substituted with Arial, which makes text appear sharp in classic based GDI.
Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes" /v "Segoe UI" /t REG_SZ /d "Arial" /f
@PureOcean
PureOcean / PinToStartMenuForSendTo.bat
Last active June 12, 2021 19:39
Pin To Start (Limitless) for the "Send To" context menu
@echo off
:: Pin To Start (Limitless) for the "Send To" context menu (by PureOcean, 2021-06-12)
:: This BAT file copies itself to the SendTo folder, thus creating any file to click in the Send To context menu as a shortcut to the Start Menu\Programs. Even .BAT/.CMD files that Windows doesn't support (That's why it was prepared).
IF EXIST "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\SendTo\%~nx0" (GOTO :PinToStart) ELSE (Copy "%~nx0" "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\SendTo\%~nx0" /y > nul && Echo %~nx0 added to the "Send To" context menu. && pause > nul && exit /b)
:PinToStart
powershell "$s=(New-Object -COM WScript.Shell).CreateShortcut('%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\%~n1.lnk');$s.TargetPath='%~f1';$s.WorkingDirectory='%cd%';$s.Save()"
@PureOcean
PureOcean / Remover_EdgeWithChromium.bat
Last active April 27, 2021 16:30
Remover_EdgeWithChromium.bat
@echo off
echo.
for /F "delims=" %%c in ('dir /s /b "%ProgramFiles(x86)%\Microsoft\Edge\setup.exe"') do "%%c" --uninstall --system-level --force-uninstall
rd /s /q "%ProgramFiles(x86)%\Microsoft\Edge"
rd /s /q "%localappdata%\Microsoft\Windows\Safety\edge"
rd /s /q "%localappdata%\Microsoft\Edge"
:: rd /s /q "%localappdata%\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
:: rd /s /q "%Windir%\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
@PureOcean
PureOcean / EdgeUpdate_Remover&Block.bat
Last active March 16, 2022 16:08
Removes secretly installed the EdgeUpdate by MS Edge Browser and prevents reinstallation
:: The BAT script completely removes the EdgeUpdate from disk and Registry, which it's always being forcefully installed by
:: MS Edge Browser and prevents it from reinstalling.
:: Microsoft Edge (based Chromium) Browser installs the "Edge Improved Recovery" component in background.
:: The "Edge Improved Recovery" downloads msedgerecovery.exe to %TEMP% folder. After execute it:
:: %ProgramFiles(x86)%\Microsoft\Temp\***\MicrosoftEdgeUpdate.exe" /install "runtime=true&needsadmin=false" /installsource chromerecovery /silent).
:: Unfortunately impossible to turn off only "Edge Improved Recovery" for now.
@echo off
echo.
@PureOcean
PureOcean / ActivateLoudnessEqualization.bat
Created September 8, 2020 09:15
Activates "Loudness Equalization" setting and Bring out "Enhancements" tab in Control Panel -> Sound -> Playback.
@echo off
%windir%\system32\whoami.exe /USER | find /i "nt authority\system" >nul 2>nul
If ERRORLEVEL 1 (echo Need run this script as TrustedInstaller && pause && GOTO :EOF)
:TrustedInstaller
:: "Property" -> Enhanchments tab
for /f "skip=3" %%a in ('powershell -command "Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\*\' | where {$_.'DeviceState' -eq 1} | Select PSChildName"') do Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\%%a\FxProperties" /v "{d04e05a6-594b-4fb6-a80d-01af5eed7d1d},3" /t REG_SZ /d "{5860E1C5-F95C-4a7a-8EC8-8AEF24F379A1}" /f
:: Toggled "Loudness Equalization" in Enhanchments tab
@PureOcean
PureOcean / Win10v2004RemoverWithToolKitHelper.bat
Created June 10, 2020 10:14
Removing Manya Apps and Components with ToolKitHelper on Offline/Mounted Image of a Windows 10 v2004
@echo off
cd /d "%~dp0"
set "NSudo=F:\NSudo\x64\NSudoLC.exe -Wait -UseCurrentConsole -U:T -P:E"
set "ToolKitHelper=F:\MSMGToolKit\Bin\ToolKitHelper.exe"
set "ImageDir=G:"
FOR %%i IN (
549981C3F5F10
@PureOcean
PureOcean / VDProject2MKVMerge.au3
Last active March 16, 2022 16:09
Converts cut edits of VirtualDub to the syntax supported by MKVMerge.
; VirtualDub's processing settings (VCF) and VirtualDub2's Project
; files store user edits using like:
;
; VirtualDub.subset.AddRange(Frame, FrameCount)
;
; This AutoIt script forked of the VCF2AVS coded by Darksoul71
; (https://forum.doom9.org/showthread.php?p=774386#post774386)
;
; Changed to read cut segments only in .VDProject & .VCF files.
;