473,387 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Looking at shortcut properties

Is there a class within C# that reveals the properties of a typical shortcut
on the desktop?

I'm looking for the information about the "Target" and "Start in" fields
within a shortcut.

--
Steve
Nov 17 '05 #1
1 1619
Steve,

There are two ways to go about this. The first is to use the classes in
the System.Management namespace and find the instance of the
Win32_ShortCutfile WMI class that corresponds to your link.

The other is to use the IShellLink interface and load the link
information yourself. Here is a link to a thread which details the
operation (watch for line wrap):

http://groups.google.com/group/micro...e386e97de2a026

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steve Teeples" <St**********@discussions.microsoft.com> wrote in message
news:BE**********************************@microsof t.com...
Is there a class within C# that reveals the properties of a typical
shortcut
on the desktop?

I'm looking for the information about the "Target" and "Start in" fields
within a shortcut.

--
Steve

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: tolisss | last post by:
Hi does ne1 know how could i make the events window appear using keyb like we have F4 for the properties window i need a shortcut for the events also can ne1 help me on this please ...
4
by: Salad | last post by:
A97. If you set a forms properties to ShortcutMenu = No, the entire form is disabled from displaying a shortcut menu. If you set the property to Yes, all controls have a shortcut menu. I have...
5
by: Steven | last post by:
I have some text boxes on a form in MS Access 2000. When I right click in them I don't get any shortcut menu at all. I want the normal cut, copy, and past menu to come up. In the "Startup", I...
2
by: Ganesh | last post by:
I have to change the tartget property of a windows start->Program->X's shortcut properties using c program. Do we have any function for that ? please reply me ASAP.. as it is urgent !
0
by: Mark Broadbent | last post by:
Hope somebody could point me in the right direction. 1. I want to be able to drag and drop a file or a shortcut from a folder (from outside the app) and drop it on the apps form. 2. From this I...
1
by: BobAchgill | last post by:
The short cuts my windows installer made for the Start and the Desktop look different than standard shortcuts. The Target in the shortcut file properties is greyed out and shows the name of the...
7
by: GrandpaB | last post by:
I would appreciate assistance learning how to create a Desktop shortcut in my setup project. In the left pane of the Setup/File System window I right-clicked User's Desktop. From the contex...
3
by: Mike Edgewood | last post by:
Is there a simple way, shortcut, or macro to create a property skeletons? I would live to be able to type a name and a type and have the property created based on that info. Private...
10
by: Matthew Wells | last post by:
I'm trying to make a shortcut that will open an mdb in the same folder as the shortcut - regardless of where the file/shortcut may be. In other words, I want to be able to copy and paste the two...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.