|
|
在Win10系统中有个奇葩的设计就是当我们要复制某个文件的路径的时候必须要按住shift键的同时选中该文件再弹出右键菜单才能复制该文件的路径,所以为了更方便,所以我直接把它加在右键中,去掉按键动作:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Windows.copyaspath]
"CanonicalName"="{707C7BC6-685A-4A4D-A275-3966A5A3EFAA}"
"CommandStateHandler"="{3B1599F9-E00A-4BBF-AD3E-B3F99FA87779}"
"CommandStateSync"=""
"Description"="@shell32.dll,-30336"
"Icon"="imageres.dll,-5302"
"InvokeCommandOnSelection"=dword:00000001
"MUIVerb"="复制文件路径(&C)"
"VerbHandler"="{f3d06e7c-1e45-4a26-847e-f9fcdee59be0}"
"VerbName"="copyaspath"
复制到记事本中另存为.reg的文件编码选择ansi,即可
以下代码保存为.cmd或.bat的批处理文件,文件编码同样为ansi
Reg.exe add "HKCR\*\shell\Windows.copyaspath" /v "CanonicalName" /t REG_SZ /d "{707C7BC6-685A-4A4D-A275-3966A5A3EFAA}" /f
Reg.exe add "HKCR\*\shell\Windows.copyaspath" /v "CommandStateHandler" /t REG_SZ /d "{3B1599F9-E00A-4BBF-AD3E-B3F99FA87779}" /f
Reg.exe add "HKCR\*\shell\Windows.copyaspath" /v "CommandStateSync" /t REG_SZ /d "" /f
Reg.exe add "HKCR\*\shell\Windows.copyaspath" /v "Description" /t REG_SZ /d "@shell32.dll,-30336" /f
Reg.exe add "HKCR\*\shell\Windows.copyaspath" /v "Icon" /t REG_SZ /d "imageres.dll,-5302" /f
Reg.exe add "HKCR\*\shell\Windows.copyaspath" /v "InvokeCommandOnSelection" /t REG_DWORD /d "1" /f
Reg.exe add "HKCR\*\shell\Windows.copyaspath" /v "MUIVerb" /t REG_SZ /d "复制文件路径(&C)" /f
Reg.exe add "HKCR\*\shell\Windows.copyaspath" /v "VerbHandler" /t REG_SZ /d "{f3d06e7c-1e45-4a26-847e-f9fcdee59be0}" /f
Reg.exe add "HKCR\*\shell\Windows.copyaspath" /v "VerbName" /t REG_SZ /d "copyaspath" /f
|
|