Shortcut not providing filepath

0

I'm used to being able to find the path to a referenced exe file for a shortcut by opening the properties dialog on the .lnk file and looking at the Target Location and Target and finding the path.

However, I'm increasingly finding in Windows 10 that I get this instead: enter image description here

How can I figure out what the Target filepath is for this .lnk file?

J. Polfer

Posted 2017-08-24T22:02:54.810

Reputation: 2 234

1

Not an answer, but this isn't a Windows 10 thing, and it's calling a "virtual object": https://blogs.msdn.microsoft.com/oldnewthing/20160902-00/?p=94235

– music2myear – 2017-08-24T22:29:01.953

Answers

1

One way to get the path is to run the program and use Task Manager to get the Image Path Name.

  1. Run the program using the shortcut.
  2. Open Task Manager.
  3. Go to the Details tab.
  4. Right-click on the column headers and select Select Columns.
  5. Select Image Path Name.
  6. Click OK.
  7. Expand the column you just added and observe the path to the running executable.

Note: Shortcuts may include arguments and other information they are passing along to the executable that are important. In order to capture all of this information, select the Command Line column as well.

music2myear

Posted 2017-08-24T22:02:54.810

Reputation: 34 957

0

If a shortcut doesn't show you the target path, it's probably because it's launching the program in a special way. For example, your program is probably calling Windows Installer to check that all of SQL Examiner's files are present and not corrupted, and then launching the program. (If they were corrupt, Windows would tell you and allow you to repair the program before opening it.) There are other things a special shortcut can do.

That said, it's still a pain in the petards when you can't see where the program is. So one thing I do is open PowerShell (this won't work in CMD), go to the directory where that shortcut is, and then type:

cat 'C:\Users\twalton\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\File Explorer.lnk'

That causes the contents of that shortcut file to be dumped out to the screen. It'll be some gibberish, but you'll also see some regular text. That text might give you a clue. When I ran the above command, it showed me the innards of the File Explorer shortcut pinned to my taskbar. Among all the gibberish I saw this:

% w i n d i r % \ e x p l o r e r . e x e

That's the program that shortcut is launching.

Todd Walton

Posted 2017-08-24T22:02:54.810

Reputation: 93