Reputation: 203
Is it possible to add shell context menus to all .txt
files via a C or C++ (either) program?
I have been creating these menus by directly accessing the registry. Also, I found C#
specific code and certain other implementation specific c, C++
versions.
Upvotes: 0
Views: 113
Reputation: 2814
There is API that allows you to access the registry.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724875(v=vs.85).aspx
Note that your application must run as administator, otherwise the change will be "virtual".
You can see some code on how to elevate the permissions of an application in this help file. Topic Fundamentals>Secure Applications>Designing UAC Applications for Windows Vista>Step 3: Redisign for UAC Compatibility, Step 4: Redesign Your UI for UAC Compatibility.
Upvotes: 1