Solved

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

Posted on 2014-03-16
1
128 Views
Last Modified: 2014-10-15
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
Comment
Question by:zonkerman
1 Comment
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 total points
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now