I'm trying to implement "Copy as path" option in windows context menu ,which copies current file or folder path to clip board instead of installing a software for this , i would like to implement it my self. Any suggestions?
相关问题
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- How can I have a python script safely exit itself?
- I want to trace logs using a Macro multi parameter
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
- How do I get to see DbgPrint output from my kernel
- CosmosDB emulator can't start since port is al
- How to print to stdout from Python script with .py
You will need to write your own shell namespace extension. A sample on how to do that using C# is available here. There is many examples on how to do that in C++ on web too.
The official documentation on the topic is available at MSDN. A specific article on this topic is Creating Context Menu Handlers.
You can add a link to the context menu by fiddling with the
File Types
dialog, or using the registry. In the registry, the path isHKEY_CLASSES_ROOT\*\shell
. Add a key under that named "Copy as path", and a key under that named "command". Change command's default string value to "c:\your-program.exe %1", and when the user selects "Copy as path" it will run your executable with that path as the argument. Now your executable just needs to write the path passed in to it to the clipboard