Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to retrieve the shortcut "Comment" field value

Status
Not open for further replies.

ctkmak

Technical User
Jan 3, 2001
1
HK
Using Powershell, I can only able retrieve the shortcut standard file, but want to know how to retrieve the shortcut comment field ??

PIC_juapyo.png
 
I found this, it might help (change the $path_to_sc variable to point to your shortcut)

Code:
$WshShell = new-object -comobject "WScript.Shell"
$path_to_sc = <path to your shortcut>
$sc_Obj = get-item -path $path_to_sc
$sc_values = $WshShell.CreateShortcut($sc_Obj)
$comment = $sc_values.description
write-host $comment


Light travels faster than sound. That's why some people appear bright until you hear them speak.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top