The Computer Oracle

Windows 7 finding location of installed program

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 2 Looping

--

Chapters
00:00 Windows 7 Finding Location Of Installed Program
00:29 Answer 1 Score 17
01:07 Accepted Answer Score 21
01:54 Answer 3 Score 2
02:38 Answer 4 Score 7
03:04 Thank you

--

Full question
https://superuser.com/questions/129416/w...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#windows7 #shortcuts

#avk47



ACCEPTED ANSWER

Score 21


What you are seeing are special shortcuts called Advertised Shortcuts. The shortcuts actually link to msiexec.exe which is the Windows Installer executable. Advertised shortcuts allow installer authors to install only portions of their application and then install additional pieces when they are accessed via the advertised shortcut. Windows Installer also automatically checks the integrity of all of the installed files each time the application is run so you can be sure the application is valid when it is run.

Here is a Stack Overflow question with a bit more info on advertised shortcuts.

Finding the executable the shortcut eventually runs is not a simple task and would involve some digging through the registry. Hugh's suggestion is likely much simpler.




ANSWER 2

Score 17


I have wondered the same thing for some shortcuts under win XP. I tried Cygwin's readshortcut but it didn't tell me the real target:

$ readshortcut.exe -fa "Microsoft Word.lnk"
Target: /cygdrive/c/WINDOWS/Installer/{00000409-78E1-11D2-B60F-006097C998E7}/wordicon.exe
Working Directory:
Arguments:
Show Command: Normal
Icon Library: /cygdrive/c/WINDOWS/Installer/{00000409-78E1-11D2-B60F-006097C998E7}/wordicon.exe
Icon Library Offset: 0
Description: Create and edit text and graphics in letters, reports, Web pages, or e-mail messages by using Microsoft Word.

So they're obviously something to do with Windows Installer. To find the executable, you can always just run it and use Process Explorer to get the path - in my case, C:\Program Files\Microsoft Office2K\Office\WINWORD.EXE.




ANSWER 3

Score 7


I had a similar issue and was able to use Task Manager (Ctrl-Alt-DeleteStart Task Manager) to find the application (after openingit) in the Applications tab.

Right-click on the desired application to bring up the menu and choose Go To Process. This shows which process is associated with the app in the Processes tab.

Then, right-click on the process to bring up the menu and choose either Properties or Open File Location to find out more.




ANSWER 4

Score 2


Try either of the below (from Tek-Tips Forums):

VbScript

' 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

PowerShell (with the install of this Windows Installer Module)

get-msiproductinfo | where { $_.ProductState -match "Installed" } | fl AdvertisedProductName, InstallLocation