Skip to content

Instantly share code, notes, and snippets.

@lennybacon
Created June 28, 2019 06:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lennybacon/f1f7f75a10f43202038d08cf9d4e66fe to your computer and use it in GitHub Desktop.
Save lennybacon/f1f7f75a10f43202038d08cf9d4e66fe to your computer and use it in GitHub Desktop.
Modify Link to run as admin
$linkFilePath = "C:\Users\$([Environment]::UserName)\Desktop\WindowsTerminal.lnk"
$bytes = [System.IO.File]::ReadAllBytes($linkFilePath)
$bytes[0x15] = $bytes[0x15] -bor 0x20 #set byte 21 (0x15) bit 6 (0x20) ON
[System.IO.File]::WriteAllBytes($linkFilePath, $bytes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment