Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top