电脑右键新建菜单里面添加新建 PowerShell,markdown 文件选项

152 阅读1分钟

右键新建里面添加 PowerShell 选项,新建一个 reg 文件,写入以下内容:

Windows Registry Editor Version 5.00  
  
[HKEY_CLASSES_ROOT.ps1]  
@="PowerShell.Script.1"  
"Content Type"="text/plain"  
  
[HKEY_CLASSES_ROOT.ps1\ShellNew]  
"NullFile"=""  
  
[HKEY_CLASSES_ROOT\PowerShell.Script.1]  
@="PowerShell Script"  
"EditFlags"=dword:00000000  
  
[HKEY_CLASSES_ROOT\PowerShell.Script.1\DefaultIcon]  
@="%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe,0"  
  
[HKEY_CLASSES_ROOT\PowerShell.Script.1\shell]  
  
[HKEY_CLASSES_ROOT\PowerShell.Script.1\shell\open]  
@=""  
"MUIVerb"="@shell32.dll,-30301"  
  
[HKEY_CLASSES_ROOT\PowerShell.Script.1\shell\open\command]  
@=""%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -File "%1" %*"  

如需删除:

Windows Registry Editor Version 5.00  
  
[-HKEY_CLASSES_ROOT.ps1]  
  
[-HKEY_CLASSES_ROOT\PowerShell.Script.1]

右键新建里面添加 markdown 选项,新建一个 reg 文件,写入以下内容:

Windows Registry Editor Version 5.00  
  
[HKEY_CLASSES_ROOT.md]  
@="MarkdownFile"  
"Content Type"="text/plain"  
  
[HKEY_CLASSES_ROOT.md\ShellNew]  
"NullFile"=""  
  
[HKEY_CLASSES_ROOT\MarkdownFile]  
@="Markdown File"  
"EditFlags"=dword:00000000  
  
[HKEY_CLASSES_ROOT\MarkdownFile\DefaultIcon]  
@="%SystemRoot%\System32\imageres.dll,-532"  
  
[HKEY_CLASSES_ROOT\MarkdownFile\shell]  
  
[HKEY_CLASSES_ROOT\MarkdownFile\shell\open]  
@=""  
"MUIVerb"="@shell32.dll,-30301"  
  
[HKEY_CLASSES_ROOT\MarkdownFile\shell\open\command]  
@=""%SystemRoot%\System32\notepad.exe" "%1" %*"  

如需删除:

Windows Registry Editor Version 5.00  
  
[-HKEY_CLASSES_ROOT.md]  
[-HKEY_CLASSES_ROOT\MarkdownFile]