6
Following up on this question over at SO (How do I open cmd window in specific location?) I'm looking for an effective way to add the Open Command Prompt Here shortcut to a context menu. Various solutions propose adding entries to HKCR\Folder and others suggest adding entries to HKCR\Directory.
Based on this question (Directory Vs. Folder) it seems a folder could be virtual or not while a directory is always "real". A ven diagram would have folder being a large circle and directory a smaller circle completely enclosed within the folder circle.
For the sake of a command prompt, is it correct to assume I'll probably only be dealing with "real" folders, or directories?
The questions then are as follows: Can I open a command prompt window in a virtual directory and what conceivable reason would I have for doing this? Would adding a context menu item ONLY to HKCR\Folder cover all my bases and then some? Would adding a context menu item ONLY to HKCR\Directory end up missing some things?
Finally, for brownie points: What if I wanted to be able to add an entry to open a command prompt by clicking inside a folder rather than on a folder icon, which context menu item would I have to use to get this function?
So does this mean adding a command prompt to each object entry in HKCR? Or is there a global object? I've loaded the Context Console app and will be testing it today. However, the geek in me wants to know more. – music2myear – 2011-07-15T14:10:46.213
1@music2myear: There's a
*
entry under HKCR. – afrazier – 2011-07-15T15:51:06.8931@surfasb: There's a very, very good reason that MS insists on native code for shell extensions - a process can only host a single instance of the .NET framework. What do you think happens if you try to load 3 shell exts, each requiring a different revision of the .NET FW (e.g., 1.1, 3.0, and 4.0)? Things break. – afrazier – 2011-07-15T15:53:49.463
1It's an unfortunate (or fortunate depending on who you are) reality. I first learned to code in C++ but quickly realized I would never excel at it. Probably would of done more harm than good. So it's managed code for this lifetime. – surfasb – 2011-07-15T18:25:21.293
1@music2myear: I suggest you read the link and all the links under the Shell extension section. If that is too much effort, just download the Shell extension. . . – surfasb – 2011-07-15T18:26:39.937
Yea, I'm performing an internal cost/benefit analysis on that. I tend to follow rabbit trails with relish, and this looks as though it may lead to a doozy. I'm deciding if it is worth spending time figuring this out when the reason I came to this question was to make it easier to follow a C# tutorial. I've installed the extension and it's working very well, doing exactly what I want. Thank you both for your input, I think this one's been answered to my satisfaction and beyond. – music2myear – 2011-07-15T18:45:48.527
1Yeah, the extension is well written. The source code link is on the same page. BTW, I did read all those links and I can assure you, it is not worth it for a non-native coder. – surfasb – 2011-07-15T18:49:09.947