Returns a shortcut's description.
object.Description |
Arguments
- object
-
WshShortcut object.
Remarks
The Description property contains a string value describing a shortcut.
Applies To:
Example
The following example demonstrates the use of the Description Property.
Copy Code | |
---|---|
<package> <job id="vbs"> <script language="VBScript"> 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+Alt+e" oShellLink.IconLocation = "notepad.exe, 0" oShellLink.Description = "Shortcut Script" oShellLink.WorkingDirectory = strDesktop oShellLink.Save set oUrlLink = WshShell.CreateShortcut(strDesktop & "\Microsoft Web Site.url") oUrlLink.TargetPath = "http://www.microsoft.com" oUrlLink.Save </script> </job> <job id="js"> <script language="JScript"> var WshShell = WScript.CreateObject("WScript.Shell"); strDesktop = WshShell.SpecialFolders("Desktop"); var oShellLink = WshShell.CreateShortcut(strDesktop + "\\Shortcut Script.lnk"); oShellLink.TargetPath = WScript.ScriptFullName; oShellLink.WindowStyle = 1; oShellLink.Hotkey = "Ctrl+Alt+e"; oShellLink.IconLocation = "notepad.exe, 0"; oShellLink.Description = "Shortcut Script"; oShellLink.WorkingDirectory = strDesktop; oShellLink.Save(); var oUrlLink = WshShell.CreateShortcut(strDesktop + "\\Microsoft Web Site.url"); oUrlLink.TargetPath = "http://www.microsoft.com"; oUrlLink.Save(); </script> </job> </package> |