Open shorcut linked folder - Context Menu

5 posts in this topic

How can I add a Find Target entry to context menu for shortcut files only? So when I click it takes me directly to the linked folder (and not file).

I tried several solutions



and a script I took on a random forum:

@echo off
If exist %windir%\FT.vbs (
echo Uninstall?&echo.&pause
reg delete HKCR\lnkfile\shell\FT /f
del %windir%\FT.vbs
reg add "HKCR\lnkfile\shell\FT" /f /ve /t REG_SZ /d "&Find Target..."
reg add "HKCR\lnkfile\shell\FT\command" /f /ve /t REG_SZ /d "WScript.exe %windir%\FT.vbs \"%%1\""
more +10 < %0 >%windir%\FT.vbs && exit /b 0
dim ws,objArgs,strPath
Set objArgs = WScript.Arguments
if objArgs.Count>0 then
end if
set ws=CreateObject("Wscript.Shell") "Explorer /select, " & GetTargetPath(strPath)

Function GetTargetPath(LinkName)
On Error Resume Next
Dim Shortcut
Set Shortcut = CreateObject("Wscript.Shell").CreateShortcut(LinkName)
GetTargetPath = Shortcut.TargetPath
Set Shortcut = Nothing
End Function

The problem is that none of them work for all shorcuts and eventually they only take me to a temporal folder where the icon is placed, etc

For example, it doesn't work with the live msn shortcut, and for the nero 10 shortcut it takes me to C:\WINDOWS\Installer\{7A5D731D-B4B3-490E-B339-75685712BAAB}


Share this post

Link to post
Share on other sites

This is how I recall having done this task in the past. I have no idea if it is the same or any better than your example method, but feel free to give it a shot.

First create this file and save it as %SystemRoot%\system32\GeTarget.vbs

Wscript.Echo CreateObject("WScript.Shell").CreateShortcut(WScript.Arguments (0)).TargetPath

The above should all be on one line.

Now paste this single line into Start » Run and click OK

reg add "HKCU\Software\Classes\lnkfile\Shell\Find Target\command" /ve /d "%comspec% /c @echo off&for /f \"delims=\" %%# in ('cscript //nologo %SystemRoot%\system32\GeTarget.vbs \"%1\"') do start \"\" explorer.exe /select, \"%%~#\"" /f


Share this post

Link to post
Share on other sites

Thanks, it is the exact same as my posted script. It only works in the same shortcuts and if anything a bit slower (passing through console window).

For example, it doesn't work in my desktop Chrome icon, MSN... the nero shortcut takes me to the same place, etc


Share this post

Link to post
Share on other sites

For the record (the "random forum") you may want to try this just for funsies -

Seems that the chap "tireless" is (maybe) the one that "invented" the script (read through above link to ANOTHER solution). There are exactly four references to that BAT file, one being OSZONES forum (was that the random one?).

Just check out the link given for potential solution.


edit - tacking on another - from link above, the poster "tireless" agreed that the script was not so hot and also linked to (guess where?)...

and a notation

Open Target may be nice, but doesn’t work on XP x64 (is a 32 bit shell extension).

edit - Also for the record, not all Shortcuts are created equal, e.g. Right-Click on the IE Desktop ICON or even My Computer, My Documents, Network Places and select Properties. The Targets work entirely differently from the Standard Shortcuts. I believe that Class-ID's have something to do with some of them.

OSZONES Forum - To get that code you have above just "View Source" and look for it.

This one points back to Yzowl script -


Edited by submix8c

Share this post

Link to post
Share on other sites

That is not the web where I took the script from, it was more like a forum, and there were corrections over the script. AFAIK there are not many different methods, so I named the three I know, included the one you linked to me in the msfn page. It's the exact same behaviour I described above (did you test it? no right? there you go).


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.