为文件添加右键菜单

新建注册表文件

新建一个文本文件,添加下列内容后,修改后缀名为.reg,双击运行即可实现。

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Edit with Paint.Net]

[HKEY_CLASSES_ROOT\*\shell\Edit with Paint.Net\command]
@="D:\Program\paint.net\PaintDotNet.exe" "%1"

执行命令行命令

  • 执行命令regedit /s C:/regbak.reg以静默安装;
  • regedit C:/regbak.reg显示安装提示信息。

猜你喜欢

转载自www.cnblogs.com/charleechan/p/12174576.html