Skip to content

Instantly share code, notes, and snippets.

@mmozeiko
mmozeiko / !README.md
Last active May 16, 2024 21:49
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone 64-bit MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for 64-bit native desktop app development.

Run python.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.32.17.2 and v10.0.22621.0.

You can list available versions with python.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe from output folder, first run setup.bat - after that PATH/INCLUDE/LIB env variables will be setup to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@ishad0w
ishad0w / microsoft_edge_uninstaller_21h1_ltsc.bat
Last active April 25, 2024 09:33
Microsoft Edge Uninstaller [Windows 10 LTSC 2021/21H1 Edition]
@echo off
@title Microsoft Edge Uninstaller [Windows 10 LTSC 2021/21H1 Edition]
ver
echo+
goto check_admin_permissions
:check_admin_permissions
echo Script must Run as Administrator! Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
@eddiezato
eddiezato / EdgeCheck.ps1
Last active February 10, 2024 08:10
Get Microsoft Edge Offline Installer (can be extracted with 7zip) [PowerShell 5.1+]
# params
[CmdletBinding(DefaultParameterSetName="Casual")]
param (
[Alias("c")]
[Parameter(ParameterSetName = "Pro", Mandatory = $true)]
[ValidateSet("stable", "beta", "dev", "canary")]
[string]$Channel,
[Alias("v")]
[Parameter(ParameterSetName = "Pro", Mandatory = $true)]
[ValidateNotNullOrEmpty()]
@cdeath
cdeath / ffmpeg_mkv_ops.md
Last active May 8, 2024 19:10
extract stuff from .mkv with ffmpeg
@judero01col
judero01col / Service KMS
Last active May 15, 2024 15:14
Volume License Activation Key Service - KMS
## Find Available Target Editions
DISM.exe /Online /Get-TargetEditions
## Convert Server Standard 2019 Evaluation to Server Standard 2019
DISM /online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
## How To Activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /skms [server]:[port]
slmgr /ato
@AveYo
AveYo / ..runasTI.bat
Last active April 13, 2024 13:25
Lean and Mean runas TrustedInstaller / System compact snippet to easily integrate in your batch scripts
@echo off& title RunAsTI - lean and mean snippet by AveYo, 2018-2022
goto :nfo
[FEATURES]
- innovative HKCU load, no need for reg load / unload ping-pong; programs get the user profile
- sets ownership privileges, high priority, and explorer support; get System if TI unavailable
- accepts special characters in paths for which default run as administrator fails
- adds Send to - RunAsTI right-click menu entry to launch files and folders as TI via explorer
[USAGE]
- First copy-paste RunAsTI snippet after .bat script content
- Then call it anywhere to launch programs with arguments as TI
@AveYo
AveYo / win10colors.cmd
Last active May 4, 2024 15:44 — forked from mlocati/win10colors.cmd
ANSI Colors in standard Windows 10 shell
@echo off
title Windows 10 native ANSI colors fast and compact macro setup by AveYo - just replace ECHO with %%@%% and ^<ESC^> with @
:: Initiate macro just once
call :@echo
:: [screenonly] [processed escape sequences]
%@% @^^[101;93m @[101;93m STYLES
%@% @^^[0m @[0m Reset
%@% @^^[1m @[1m Bold
%@% @^^[4m @[4m Underline
@DoubleLabyrinth
DoubleLabyrinth / fix.py
Last active January 17, 2024 03:16
Remove mutant entry in Start: ms-resource:AppName/Text
import os, sqlite3
conn = sqlite3.connect(os.path.expandvars(r'%ProgramData%\Microsoft\Windows\AppRepository\StateRepository-Machine.srd'))
cursor = conn.execute(
'''
SELECT _PackageID, PackageFullName FROM main.Package
WHERE PackageFullName LIKE "Microsoft.Windows.HolographicFirstRun%";
'''
)
@navono
navono / jsonParser.bat
Last active February 14, 2024 23:11
parse JSON file by windows batch
:: Read file "package.json" into variable string, removing line breaks.
set string=
for /f "delims=" %%x in (package.json) do set "string=!string!%%x"
rem Remove quotes
set string=%string:"=%
rem Remove braces
set "string=%string:~2,-2%"
rem Change colon+space by equal-sign
set "string=%string:: ==%"