Skip to content

Instantly share code, notes, and snippets.

# Uninstall some built-in UWP apps. Tested on Win 10 22H2 and Win 11 24H2
$app2delete = @(
# Get list of installed apps: Get-AppxPackage | Select Name, PackageFullName
"Microsoft.Copilot",
"Microsoft.Windows.DevHome",
"Microsoft.549981C3F5F10", # Cortana
"Microsoft.WindowsFeedbackHub",
"Microsoft.MicrosoftOfficeHub", # Office 365
"microsoft.windowscommunicationsapps", # Outlook (Mail and Calendar)
; 1) download and extract https://www.autohotkey.com/download/ahk-v2.zip
; 2) place this file near .exe and name the same e.g. AutoHotkey64.ahk
; 3) run .exe
; Hotstrings:
:o:@.::[email protected]
::pa.::ping -a
:o:pg.::ping google.com -t
:: 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.9.0/technical/official-presets.html
:: HandBrakeCLI.exe должен быть в %PATH% (winget install HandBrake.HandBrake.CLI)
:: либо рядом с .bat (https://handbrake.fr/downloads2.php)
# Recursively deletes files to the Recycle Bin older than X days in specified folder
#
# Example usage: powershell -Ep Bypass 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 v25.4 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 for Windows 10 ? & echo. & pause & echo. & goto 10
if "%%a"=="11" echo RUN SCRIPT for Windows 11 ? & echo. & pause & echo. & goto 11
:: 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%"