Add entry to explorer's context menu query?
Posted on 2004-09-29
I want to add the entry of my dialog based app's exe in the context menu of all files.
To do this what i have done is in the registry: under HKEY_CLASSES_ROOT\*\shell i have created a new key by the name "my_exe" & then a key named "command" under the key "my_exe".
Now in the key named "command" i set the data of (default) as " C:\aa.exe %1".
Now as result this whenever i right click on any file i see the entry of my exe as "my_exe".
So far so good. Now i have 3 files on my desktop 1.doc, 2.txt & 3.cpp. When i double click on 1.doc file gets opened in WORD. for 2.txt file gets opened in the NOTEPAD but when i double click on the 3.cpp my_exe is executed where as 3.cpp shud be opened in Visual Studio.
On closely watching when i right click on 1.doc in the context menu "Open"is the default command.
for 2.txt also "Open" is default command but for 3.cpp "my_exe" is bold ie "my_exe" becums the default command for 3.cpp.
y is this happening. How can i stop this?
I want only when the user right clicks on a file and then select "my_exe", then only my exe shud be executed.
Waiting for suggestions