WSH » WshShortcut » TargetPath

Syntax:
object.TargetPath

The TargetPath property sets or retrieves the location of the file that is the target of the shortcut. The arguments that are passed to the shortcut are unaffected by the setting of this property.

Examples

Code:
Set objShell = WScript.CreateObject("WScript.Shell")
Set objShtCut = objShell.CreateShortcut _
    ("C:\Documents And Settings\DevGuru\Desktop\Shortcut To Test Script.lnk")
objShtCut.TargetPath = "C:\test.js"
objShtCut.Save
WScript.Echo objShtCut.TargetPath
Output:
C:\Test.js
Explanation:

This VBScript code sets the target for a shortcut called "Shortcut to Test Script.lnk" to "C:\test.js".

Language(s): VBScript