Created
June 28, 2019 06:51
-
-
Save lennybacon/f1f7f75a10f43202038d08cf9d4e66fe to your computer and use it in GitHub Desktop.
Modify Link to run as admin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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