Last active
June 11, 2022 12:37
-
-
Save Serat00l951/ce8710f2111244ab70b4db383a539064 to your computer and use it in GitHub Desktop.
Disable starting powershell scripts with double click
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
rem Run this with admin rights! | |
rem Запускать от имени администратора! | |
powershell -command "& {Set-ExecutionPolicy -ExecutionPolicy Restricted -Force}" | |
ftype Microsoft.PowerShellScript.1="C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe" "%%1" | |
assoc .ps1=Microsoft.PowerShellScript.1 | |
reg delete "HKCR\Microsoft.PowerShellScript.1\shell\runas" /f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment