Returns the fully qualified path of the shortcut object's target.
object.FullName |
Arguments
- object
-
WshShortcut object.
Remarks
The FullName property contains a read-only string value indicating the fully qualified path to the shortcut's target.
Example
The following code retrieves the fully qualified path of a shortcut.
Visual Basic Script | Copy Code |
---|---|
set WshShell = WScript.CreateObject("WScript.Shell") strDesktop = WshShell.SpecialFolders("Desktop") set oShellLink = WshShell.CreateShortcut(strDesktop & "\Shortcut Script.lnk") oShellLink.TargetPath = WScript.ScriptFullName oShellLink.WindowStyle = 1 oShellLink.Hotkey = "CTRL+SHIFT+F" oShellLink.IconLocation = "notepad.exe, 0" oShellLink.Description = "Shortcut Script" oShellLink.WorkingDirectory = strDesktop oShellLink.Save WScript.Echo oShellLink.FullName |
JScript | Copy Code |
---|---|
var WshShell = new ActiveXObject("WScript.Shell"); strDesktop = WshShell.SpecialFolders("Desktop"); var oShellLink = WshShell.CreateShortcut(strDesktop + "\\Shortcut Script.lnk"); oShellLink.TargetPath = WScript.ScriptFullName; oShellLink.WindowStyle = 1; oShellLink.Hotkey = "CTRL+SHIFT+F"; oShellLink.IconLocation = "notepad.exe, 0"; oShellLink.Description = "Shortcut Script"; oShellLink.WorkingDirectory = strDesktop; oShellLink.Save(); WScript.Echo(oShellLink.FullName); |