473,326 Members | 2,438 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,326 software developers and data experts.

How to get icons of shortcuts(.lnk) without error?

I would like to display the shortcuts in a folder on my C#
application. Of course I would like the linked application to be
executed when the user double click on a icon.

To do so, I need to be able to get the icon and the target path
from .lnk files. I've searched Google and found that many pages lead
to http://www.msjogren.net/dotnet/eng/s..._shelllink.asp.
The sample program looked fine and I thought it would give me all the
things I wanted. BUT, I think that sample program has some bugs. It
didn't always display icons for all .lnk files. For some .lnk files,
all other information were displayed correctly but the icon was not
displayed.

Is there a 100% working way of getting icons from .lnk (shortcut)
files?

Mar 17 '07 #1
0 1511

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

Similar topics

0
by: TC | last post by:
I know .NET setup projects use "Windows Installer" shortcuts instead of ordinary shortcuts, but I'm having trouble with those, so I'd like to hard-code some ordinary shortcuts in the user's start...
3
by: Stanislaw Findeisen | last post by:
Does anyone know how to create file shortcuts in Windows? The only way I know is like: --------------------------------------------------------------- import win32com.client ...
1
by: Jeti [work] | last post by:
How to read information from .lnk file? I'm interested in "Target" and "Start In" properties... thanks
0
by: Rui Oliveira | last post by:
I am using a tree from CTreeCtrl. To create the imagelist I am using a bitmap with 256 colours. But the icons in my tree only appear with 16 colours. What is supposed to do to have icons...
1
by: noleander | last post by:
Hello. Ive got a VC++ program. Inside the program Ive got some code that has a full file path: C:\aa\bb\cc\dd\file.txt One of the folders in that path (cc) is a shortcut pointing to some...
4
by: garyusenet | last post by:
I want to write a quick and simple programme to update a shortcut on about 20 peoples workstations. They will all have the same shortcut, so I thought the simplest way would be to create the...
6
by: Cross | last post by:
Is there anyone who knows how to parse a windows shortcut (lnk file) on the start menu? How hard could it be, it is just a few values, like Target file, Icon file... I search for in on Internet...
4
by: David Jackson | last post by:
Hello, I've been asked to write a sort of "desktop clean-up" utility. Requirements are simple: iterate through the shortcuts (*.lnk files) on the currently logged-on user's desktop, and delete...
6
by: Joe Duchtel | last post by:
Hello - I'm trying to put together a little VB .NET (1.1 in VS 2003) application that lets me substitute the path in the Target: and Start in: fields of *.lnk files. Is there any way to do...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.