问题
I'm trying to write a program that can password protect individual folders, but I'm having a little trouble. I already have the option added to the context menu, but I don't know how to get the folder path that was right clicked on to open the context menu program.
回答1:
The OS should pass the path to your program as an argument. It should be the first one. You would just need to capture the command line arguments in your code.
C# - Arguments for application
来源:https://stackoverflow.com/questions/8931305/directory-path-from-right-click