RelativePath Property

Assigns a relative path to a shortcut, or identifies the relative path of a shortcut.

                      object.RelativePath

Arguments

  • object
    WshShortcut object.

Remarks

String.

Example

The following code sets the relative path of a shortcut.

Dim WshShell, WshShortcut
Set WshShell = WScript.CreateObject ("WScript.Shell")
Set WshShortcut = WshShell.CreateShortcut("MyScript.lnk")
WshShortcut.RelativePath = "C:\Scripts\"
var WshShell = WScript.CreateObject ("WScript.Shell");
var WshShortcut = WshShell.CreateShortcut("MyScript.lnk");
WshShortcut.RelativePath = "C:\\Scripts\\";

Applies To:

WshShortcut Object

See Also

Reference

TargetPath Property