tags:

views:

224

answers:

2

From what I have read until now, you can get the TargetPath property of an objet of class Shortcut, which is the result of the method CreateShortcut of WScript.Shell.

But I have not found any way to get the target path of an existing shortcut.

A: 

In javascript:

var sh = WScript.CreateObject("WScript.Shell");
var sc = sh.CreateShortcut(shortcutPath);
var targePath = sc.TargetPath;

It took me some time to understand it. So I guess there will be at least one person happy to find the answer here.

Fabien
A: 

by using .path property?

http://www.bigresource.com/VB-Get-the-stored-path-from-a-shortcut--UWlkOW9XKz.html

DmitryK
I gave it a try in javascript, but I was unable to use the GetLink method on a file object even if this file is actually a link.
Fabien