473,385 Members | 1,478 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,385 software developers and data experts.

Desktop Shortcut Properties

Is there a class within C# that will allow me to look at the properties of a
shortcut on the desktop?

I'd like to look at the start locations of specific shortcuts.

--
Steve
Nov 17 '05 #1
1 6268
Hello Steve,
Is there a class within C# that will allow me to look at the properties of a
shortcut on the desktop?
I'd like to look at the start locations of specific shortcuts.


One possibility is to include:
"Windows Script Host Object Model" [wshom.ocx]

// using IWshRuntimeLibrary; using System.IO;
// first create a shortcut on desktop named "myLink"
WshShellClass wsh = new WshShellClass();
string lnkPath = Path.Combine(Environment.GetFolderPath(
Environment.SpecialFolder.DesktopDirectory), "myLink.lnk");
WshShortcut wsc = (WshShortcut)wsh.CreateShortcut(lnkPath);
MessageBox.Show(wsc.TargetPath + ", " + wsc.FullName + ", " +
wsc.Description);
ciao Frank
--
Dipl.Inf. Frank Dzaebel [MCP C#]
http://Dzaebel.NET

Nov 17 '05 #2

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

Similar topics

5
by: Eskimo Joe | last post by:
I am trying to create a desktop icon using VB6. is this possible? -p
4
by: NaterPotater | last post by:
I can't seem to get my head around the Visual Studio's Deployment Projects: I want the user, at install-time, to be able to specify if they want a icon placed on the desktop or not (I'm trying to...
5
by: DraguVaso | last post by:
Hi, I want my appliation to Run a Shortcut on my Desktop. This should be done regardless the fact if the Shortcut is in the All Users\Desktop or MyProfile\Desktop and regardless the version of...
3
by: Michael D. Murphy | last post by:
Hi, I am searching for a way to creat desktop shortcuts when running the setup files that were created within a VB solution using the setup wizard. Thanks, Michael
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...
1
by: Paulers | last post by:
I have been searching for example code that will create a shortcut link to a file and place it on the desktop. I have searched google and found a couple examples using the windows scripting object...
1
by: Mike L | last post by:
How do I set the publish wizard to add a shortcut to the client's desktop?
0
by: peter.bittner | last post by:
I have developed a Windows application in Visual Studio .NET 2003 and created a Setup project for it. In the File System Editor I have added a shortcut to the User's Desktop folder to point to the...
3
by: Jeff | last post by:
I need help in figuring out why a shortcut on a desktop to an access database times out and never opens. This occurs on one computer and not the rest.. I am able to open MSaccess and then the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.