Skip to content

Instantly share code, notes, and snippets.

:: Adds various useful commands to the Explorer context menu
:: Use ShiftMenu.bat /e to also install 'Firewall' and 'Defender exclusions' entry
:: Use ShiftMenu.bat /u to undo all changes
:: by t.me/wincmd64
@ECHO OFF
(Net session >nul 2>&1) && (cd /d "%~dp0") || (PowerShell start """%~0""" -verb RunAs %* & Exit /B)
if /i "%1"=="/u" goto uninstall
# Uninstall some built-in UWP apps
# Tested on Win 10 22H2 (oct. 2024)
# Tested on Win 11 24H2
# List of installed apps: Get-AppxPackage | Select Name, PackageFullName
$appNames = @(
"Microsoft.Copilot",
"Microsoft.549981C3F5F10", # Cortana
#SingleInstance Force
; ___ Hotkeys ___
; AltGr -- change lang to UA
; LCtrl -- change lang to EN
; RCtrl -- change lang to RU
; Ctrl+Alt+Shift+F12 -- show current Locale ID (for testing purpose)
; Ctrl+Shift+V -- paste plain text
; ___ Hotstrings ___
@echo off
:: [ws] [wi] [wu] -- winget search ? | install ? | update (?)
:: [ps] [pe] {p+} -- %PATH% show | edit | add current
:: [p] [pg] [p8] -- ping ? | google -t | 8.8.8.8 -t
:: [ip] [ipf] [2ip] -- ipconfig | flushdns | ext. IP info
:: [play] -- ssh nethack
:: [ms] -- win\office activator
:: {ff} -- fastfetch (?)
:: *su* -- sudo ?
:: Replacing default notepad.exe with your editor
:: https://t.me/wincmd64
@echo off
(Net session >nul 2>&1)&&(cd /d "%~dp0")||(PowerShell start """%~0""" -verb RunAs & Exit /B)
:: path to your editor
SET "NOTEPAD_PATH=%ProgramFiles%\Notepad++\notepad++.exe"
echo Set "%NOTEPAD_PATH%" as default editor? & echo. & pause
@echo on
:: ПАКЕТНАЯ КОНВЕРТАЦИЯ ВИДЕОФАЙЛОВ С ПОМОЩЬЮ ПРЕСЕТОВ HANDBRAKE
:: by https://t.me/wincmd64
:: ИСПОЛЬЗОВАНИЕ:
:: 1. создать ярлык на этот .bat-файл в папке Shell:SendTo (либо кнопкой в TotalCmd с параметром %P%S)
:: 2. выделить нужные видеофайлы и выбрать в контекстном меню пункт Отправить > *имя_ярлыка*
:: 3. ввести нужное название пресета из https://handbrake.fr/docs/en/1.6.0/technical/official-presets.html
:: HandBrakeCLI.exe должен быть в PATH (winget install HandBrake.HandBrake.CLI)
:: либо рядом с .bat (https://handbrake.fr/downloads2.php)
:: Adds "Emsisoft Scanner" entry to the Explorer context menu
::
:: Installation:
:: 1. Download and unpack: https://www.emsisoft.com/en/commandline-scanner/
:: for x64 -- https://dl.emsisoft.com/EmsisoftCommandlineScanner64.exe
:: for x32 -- https://dl.emsisoft.com/EmsisoftCommandlineScanner32.exe
:: 2. Add the unpacked directory to %PATH%
:: 3. Run this file
@echo off
# Recursively deletes files to the Recycle Bin older than X days in specified folder
#
# Example usage: powershell clean.ps1 -d 7 -dir $env:TEMP -ext ".tmp .log"
#
# Parameters:
# -d X : Specifies that files older than X days will be deleted (mandatory)
# -dir "path" : Specifies the directory to search for files; defaults to the current directory if not provided
# -ext ".ext1 .ext2 ..." : Specifies the file extensions to delete (optional)
# -test : If specified, shows files that would be deleted without actually deleting them
:: Tested on Win 11 24H2
:: Tested on Win 10 22H2
@echo off & Title Windows 10\11 quick setup v24.10 by https://t.me/wincmd64
(Net session >nul 2>&1)&&(cd /d "%~dp0")||(PowerShell start """%~0""" -verb RunAs & Exit /B)
:: check win ver
for /f %%a in ('powershell.exe -NoP -NoL -NonI -EP Bp -c "(gwmi Win32_OperatingSystem).Caption -Replace '\D'"') do (
if "%%a"=="10" echo RUN SCRIPT ? & echo. & pause & echo. & goto 10
if "%%a"=="11" echo RUN SCRIPT ? & echo. & pause & echo. & goto 11
@wincmd64
wincmd64 / yt-dlp.bat
Last active November 11, 2024 11:43
:: Downloads video from link in clipboard using yt-dlp (+ ffmpeg)
:: winget install yt-dlp.yt-dlp Gyan.FFmpeg
@echo off
:: finds the downloads folder
for /f "delims=" %%a in ('powershell -command "(New-Object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path"') do set "DOWNLOADS=%%a"
:: get value from clipboard
for /f "delims=" %%i in ('powershell Get-Clipboard') do set "url=%%i"
:check
yt-dlp.exe -F -S vext "%url%"