Question

Locked

hiding the target and find target from a windows shortcut

By anis.h ·
Trying to hide the target and find target from a shortcut but it didn't work
if somebody has a way please post
thanks

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Try this bat file for 'Find target'

by dal765 In reply to hiding the target and fin ...

Hi, found this bat which adds Find Target to the context menu here:

http://www.jsifaq.com/SF/Tips/Tip.aspx?

It correctly launches an explorer replacement (Dopus) compared to another hard coded one wihich insisted on launching explorer.

Rem Find_Target.bat - find target of a shortcut

id=9693
@echo off
setlocal
set FT="%TEMP%\Find_Target.tmp"
set FTV="C:\Find_Target.vbs"
@echo REGEDIT4>%FT%
@echo.>>%FT%
@echo [HKEY_CLASSES_ROOT\lnkfile\Shell\Find Target\command]>>%FT%
@echo @="wscript.exe \"C:\\Find_target.vbs\" \"%%1\"">>%FT%
@echo.>>%FT%
@echo.>>%FT%
@echo Dim param, filenam, targt, shortct>%FTV%
@echo Set param = WScript.Arguments>>%FTV%
@echo filenam = param (0)>>%FTV%
@echo Set WshShell = WScript.CreateObject("WScript.Shell")>>%FTV%
@echo Set shortct = WshShell.CreateShortcut(filenam)>>%FTV%
@echo targt = shortct.TargetPath>>%FTV%
@echo WshShell.Run "%windir%\explorer.exe /select," ^& Chr(34) ^& targt ^& Chr(34)>>%FTV%
regedit /s %FT%
del /q %FT%
endlocal

Collapse -

Try this bat file for 'Find target'

by dal765 In reply to hiding the target and fin ...

Hi, found this bat which adds Find Target to the context menu here:

http://www.jsifaq.com/SF/Tips/Tip.aspx?

It correctly launches an explorer replacement (Dopus) compared to another hard coded one which insisted on launching explorer.

Rem Find_Target.bat - find target of a shortcut

id=9693
@echo off
setlocal
set FT="%TEMP%\Find_Target.tmp"
set FTV="C:\Find_Target.vbs"
@echo REGEDIT4>%FT%
@echo.>>%FT%
@echo [HKEY_CLASSES_ROOT\lnkfile\Shell\Find Target\command]>>%FT%
@echo @="wscript.exe \"C:\\Find_target.vbs\" \"%%1\"">>%FT%
@echo.>>%FT%
@echo.>>%FT%
@echo Dim param, filenam, targt, shortct>%FTV%
@echo Set param = WScript.Arguments>>%FTV%
@echo filenam = param (0)>>%FTV%
@echo Set WshShell = WScript.CreateObject("WScript.Shell")>>%FTV%
@echo Set shortct = WshShell.CreateShortcut(filenam)>>%FTV%
@echo targt = shortct.TargetPath>>%FTV%
@echo WshShell.Run "%windir%\explorer.exe /select," ^& Chr(34) ^& targt ^& Chr(34)>>%FTV%
regedit /s %FT%
del /q %FT%
endlocal

Collapse -

Did not understand what this script do?

by anis.h In reply to Try this bat file for 'Fi ...

I have visited the link you mention and tried to understand the script you wrote but it is not clear and i don't like to try it on a pc before understanding what it does.
Thanks

Collapse -

What the script says it should do - & what it does.

by dal765 In reply to Did not understand what t ...

Hi,
1. What it says it should do is
a. create a right click context menu entry 'Find target' when you click on a lnk (shortcut) file.
b. when you click on 'Find target' in the context menu, open explorer at the target.

Note-it's not my script- so I'm just looking at it.. I've been wanting to find an easy way to open explorer at the target location of my start menu shortcuts.

2. What it does (on my PC- XP Pro).
a. Adds a (conditional) new 'Find target' entry on the rt click context menu.
b. This new menu ONLY (alas) appears when I rt click on an expanded start menu (hover mouse over start menu, programs, etc, rt click on any shortcut.
c. When you click on 'Find target' explorer (or Directory opus in my case) opens at the target location.

3. What it does not do
Now I've looked further it the Find Target option does NOT appear if you look at a set of shortcuts in an explorer pane. Any ideas?

4. How it does it.
a. The bat file adds 'Find Target'
b. The bat file creates a vbs file on C:
c. The vbs script file launches explorer at the target location
"C:\WINDOWS\explorer.exe /select," & Chr(34) & targt & Chr(34)

It's perfectly safe, but I don't know why it doesn't seem to work universally- i.e. for shortcuts in an explorer pane.

If you've any ideas, I'd like to know- but it solves my need for a quick way to start menu targets!

David L.

Collapse -

I found a way to go around this matter but its not exactly what i wanted

by anis.h In reply to What the script says it s ...

Thank you for your replys, but i don't think you understood what i was searching for.
I have a client who is afraid that the users will right click on a shortcut and click find target and mess with the files. There is no efficient way to protect the files using ntfs permissions as all users need to have the read and write rights.
I have found out that if you create a favorite shortcut it will not include the find target button but it still shows you the target that a user can copy and paste in the explorer.
thanks again but if you understand my situation you may find another method as the one you gave me will make it easier for the users to reach the target.

Collapse -

FInd Target

by dal765 In reply to I found a way to go aroun ...

Hi, from your original ? I understood you were looking for both solutions- hide and a quick way to get there. Sorry.

BTW, Findme, Find Target (other programs)and the script above do work with shortcuts in explorer panes and expanded start menus, but NOT with desktop shortcuts.

Back to Windows Forum
7 total posts (Page 1 of 1)  

Operating Systems Forums