From 1caf3111d3ef31cace0a1384071000e0a54c3a5e Mon Sep 17 00:00:00 2001 From: Chris Titus Tech Date: Tue, 29 Oct 2024 16:21:57 -0500 Subject: [PATCH] remove shortcut hexedit --- functions/public/Invoke-WPFShortcut.ps1 | 7 ------- 1 file changed, 7 deletions(-) diff --git a/functions/public/Invoke-WPFShortcut.ps1 b/functions/public/Invoke-WPFShortcut.ps1 index e4e47871..9f5d379f 100644 --- a/functions/public/Invoke-WPFShortcut.ps1 +++ b/functions/public/Invoke-WPFShortcut.ps1 @@ -61,12 +61,5 @@ function Invoke-WPFShortcut { # Save the Shortcut to disk $Shortcut.Save() - if ($RunAsAdmin -eq $true) { - $bytes = [System.IO.File]::ReadAllBytes($FileBrowser.FileName) - # Set byte value at position 0x15 in hex, or 21 in decimal, from the value 0x00 to 0x20 in hex - $bytes[0x15] = $bytes[0x15] -bor 0x20 - [System.IO.File]::WriteAllBytes($FileBrowser.FileName, $bytes) - } - Write-Host "Shortcut for $ShortcutToAdd has been saved to $($FileBrowser.FileName) with 'Run as administrator' set to $RunAsAdmin" }