{"id":1561,"date":"2013-01-07T21:53:21","date_gmt":"2013-01-07T19:53:21","guid":{"rendered":"http:\/\/9v.lt\/blog\/?p=1561"},"modified":"2022-01-19T08:34:41","modified_gmt":"2022-01-19T06:34:41","slug":"target-opener-program-to-add-find-target-to-context-menu","status":"publish","type":"post","link":"http:\/\/9v.lt\/blog\/target-opener-program-to-add-find-target-to-context-menu\/","title":{"rendered":"Target opener &#8211; program to add &#8220;Find target&#8221; to context menu"},"content":{"rendered":"<p>My newest project in C++. I just started with C++ so code might not be godlike, so bear with me.<br \/>\nMainly to make my life easier, because I usually use the &#8220;<em>Find target<\/em>&#8221; button on shortcuts and to save me some clicking I made this.<br \/>\nSolutions for this problem already exist, but they all need registering with regsrv32 this and running in CMD that. Fuck &#8217;em. My solution is simple and it works.<\/p>\n<p>It adds a context menu entry via the registry for LNK file types (shortcuts). So when you right-click a shortcut, &#8220;<em>Find target<\/em>&#8221; item appears.<br \/>\nIt works on WinXP and Win7. But for Win7 you have to do something about that UAC &#8211; most likely just disable that shit, it&#8217;s useless anyway.<br \/>\n<!--more--><br \/>\nSo, I packed everything in a self-extracting archive. Extract it to somewhere and there will be the program and 3 batch files. Run &#8220;<em>add.bat<\/em>&#8221; to install it, &#8220;<em>remove.bat<\/em>&#8221; to remove it.<br \/>\nRun <em>TargetOpener.exe<\/em> in CMD with &#8220;<em>help<\/em>&#8221; arg to see the usage help. But included batch files are enough.<\/p>\n<p>Anyway, here is the archive:<br \/>\n<a href=\"http:\/\/9v.lt\/projects\/C\/TargetOpener\/TargetOpenerArchive.exe\" target=\"_blank\" rel=\"noopener\">TargetOpenerArchive.exe<\/a><\/p>\n<p>here is the whole project (made with Embarcadero RAD studio):<br \/>\n<a href=\"http:\/\/9v.lt\/projects\/C\/TargetOpener\/TargetOpenerProject.zip\" target=\"_blank\" rel=\"noopener\">TargetOpenerProject.zip<\/a><\/p>\n<p>and here is the code (I must confess &#8211; path extraction from LNK files snippet was put together from pieces found on the web and modified a bit, I didn&#8217;t write it entirely):<br \/>\n<a href=\"http:\/\/9v.lt\/projects\/C\/TargetOpener\/TargetOpener.cpp\" target=\"_blank\" rel=\"noopener\">TargetOpener.cpp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>My newest project in C++. I just started with C++ so code might not be<\/p>\n","protected":false},"author":2,"featured_media":1647,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,750],"tags":[848,846,847],"class_list":["post-1561","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","category-software-projects","tag-cpp","tag-find-target","tag-shortcut"],"_links":{"self":[{"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/posts\/1561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/comments?post=1561"}],"version-history":[{"count":0,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/posts\/1561\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/media\/1647"}],"wp:attachment":[{"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/media?parent=1561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/categories?post=1561"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/9v.lt\/blog\/wp-json\/wp\/v2\/tags?post=1561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}