Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where do Shortcut icons point to? And how would we know?

Status
Not open for further replies.

HuntsmanHTS

Programmer
Feb 20, 2013
1
0
0
GB


Why it is needed?
example:- if I go programs/microsoft office/excel 2007 all I get is properties/location bla bla start menu/microsoft office... no use at all!

thread1726-1604450 talks about using a vbscript to give us the information we need.

' GetRealTarget.vbs
' This version needs to be run under wscript engine rather than cscript

' Pass the full path to an MSI "Advertised Shortcut" lnk file (including the extension) as a parameter
' e.g. assuming that we have a default install of Office 2003 for All Users:
' GetRealTarget "C:\Documents and Settings\All Users\Start Menu\Programs\Microsoft Office\Microsoft Office Excel 2003.lnk"
' Displays fully resolved target for the MSI shortcut

Option Explicit
Dim MSITarget

On Error Resume Next ' just some simple error handling for purposes of this example
If wscript.arguments.count = 1 Then ' did actually pass an MSI advertised shortcut? Or, at least, a parameter that could be such a thing?
With CreateObject("WindowsInstaller.Installer")
Set MSITarget = .ShortcutTarget(wscript.arguments(0))
If Err = 0 then
MsgBox .ComponentPath(MSITarget.StringData(1), MSITarget.StringData(3))
Else
MsgBox wscript.arguments(0) & vbcrlf & "is not a legitimate MSI shortcut file or could not be found"
End If
End With
End If
On Error Goto 0


How to I use the above? (not done vb for years)

Thanks.

P.S. It would be much easier if Windows 7 told us :(
 
I guess I don't understand, If I right click on an icon, and then click on properties, Shortcut tab. It gives me the exact path, including switches. You can even click on "open file location" and explorer starts and opens the folder and hi-lights the executable.
 
rclarke250, have you ever tried to do this i.e. for Adobe Reader XI icon? In Start menu, not on desktop. There is no path to executable, nor working folder. The same for most of MS Office icons.

===
Karlis
ECDL; MCSA
 
Yeah, I was wondering too, but that's a great example. Slightly annoying if you want to figure it out in a hurry.
 
If you open word 2013.lnk in notepad you get:

L  À FÍP  Í PàOÐ ê:i¢Ø +00 /C:\ R 1 hAB Windows <   ï¾î:…hAB* v  W i n d o w s  X 1 lAõT INSTAL~1 @   ï¾û@ÔjlAõT* Sè  I n s t a l l e r  ’ 1 lAõT {91150~1 z   ï¾lAõTlAõT* õr  { 9 1 1 5 0 0 0 0 - 0 0 1 1 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 0 0 0 F F 1 C E }  b 2 p. lAõT! wordicon.exe F   ï¾lAõTlAõT* þr w o r d i c o n . e x e  H C r e a t e b e a u t i f u l d o c u m e n t s , e a s i l y w o r k w i t h o t h e r s , a n d e n j o y t h e r e a d . W . . \ . . \ . . \ . . \ . . \ . . \ W i n d o w s \ I n s t a l l e r \ { 9 1 1 5 0 0 0 0 - 0 0 1 1 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 0 0 0 F F 1 C E } \ w o r d i c o n . e x e H C : \ W i n d o w s \ I n s t a l l e r \ { 9 1 1 5 0 0 0 0 - 0 0 1 1 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 0 0 0 F F 1 C E } \ w o r d i c o n . e x e    zqP^V5!!!!!!!!!MKKSkWORDFiles>!2-1&m&8y@Nmo2r)^f-C z q P ^ V 5 ! ! ! ! ! ! ! ! ! M K K S k W O R D F i l e s > ! 2 - 1 & m & 8 y @ N m o 2 r ) ^ f - C    %SystemRoot%\Installer\{91150000-0011-0000-0000-0000000FF1CE}\wordicon.exe % S y s t e m R o o t % \ I n s t a l l e r \ { 9 1 1 5 0 0 0 0 - 0 0 1 1 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 0 0 0 F F 1 C E } \ w o r d i c o n . e x e ú  Á 1SPSà…ŸòùOh«‘ +'³Ù¥   I C r e a t e b e a u t i f u l d o c u m e n t s , e a s i l y w o r k w i t h o t h e r s , a n d e n j o y t h e r e a d . - 1SPSU(LŸyŸ9K¨ÐáÔ-áÕó  ÿÿ

ACSS - SME
General Geek



1832163.png
 
Nope, never tried those, I don't use office on my home PC, but I tried the Adobe reader shortcut, and that is weird. Never seen that before.
 
Seems those icons on the start menu are SPECIAL in some way. You can't even see the properties of Acrobat Reader from %appdata%\microsoft\windows\start menu\programs as it's not in there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top