使PS1脚本可以双击运行


将一下内容复制到.reg文件中,双击执行,选择合并

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.ps1]
@="powershellfile"

[HKEY_CLASSES_ROOT\powershellfile\shell\open\command]
@="\"C:\\Windows\\System32\\notepad.exe\" \"%1\""

评论
  目录