• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 157
  • Last Modified:

How can I read the Location property from the general tab of a shortcut in the Start Menu using C# ?

How do can I read the Location property shown on the "General" tab of a shortcut listed in the Start Menu All Programs area when I view its properties using a C# program?

I am able to read the properties from the IWshShortcut object from the IWshRuntimeLibrary assembly but that object does not contain the value of the "Location" shown in the shortcut properties General tab.
0
zonkerman
Asked:
zonkerman
1 Solution
 
Craig WagnerSoftware ArchitectCommented:
From what I can see the Location is simply derived from the TargetPath, so just parse it out using the Path object, i.e.

Path.GetDirectoryName( myShortcut.TargetPath );

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now