473,385 Members | 1,907 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.

How to get URL from .lnk shortcut file?

Any idea how to get the url reference from a shortcut file using
vb.net? The program can access the file name (ending in .lnk), but not
sure how to take it to the next step...

Nov 23 '05 #1
5 3559
<in************@gmail.com> schrieb:
Any idea how to get the url reference from a shortcut file using
vb.net? The program can access the file name (ending in .lnk), but not
sure how to take it to the next step...


Web shortcuts are INI files only. You'll find some samples which demonstrate
how to access INI files on the bottom of the page referenced below:

Storing and loading user preferences
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=userpreferences&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #2
So, does that mean that each Internet Shortcut in the Favorites folder
has a corresponding URL in an .INI file somewhere? Any idea what that
..ini file would be called?

Nov 23 '05 #3
<in************@gmail.com> schrieb:
So, does that mean that each Internet Shortcut in the Favorites folder
has a corresponding URL in an .INI file somewhere?


No, the ".lnk" file's content is formatted in the INI format.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 23 '05 #4
Thanks! I finally got it (sorry, guess I'm a bit slow :)

The .url files are really .ini files and you can use the
getPrivateProfileString to get the values from that file...

Do you think it'll mess up anything if I insert additional sections &
keys into the .url files?

Nov 23 '05 #5
<in************@gmail.com> schrieb:
The .url files are really .ini files and you can use the
getPrivateProfileString to get the values from that file...

Do you think it'll mess up anything if I insert additional sections &
keys into the .url files?


I have never tested that, but I assume it won't mess up anything, especially
if you add them at the end of the files.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #6

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

Similar topics

27
by: aa | last post by:
Thought this question might be out of this NG's scope, there are always knowledgable people who might hava an answer. A hyperlink to a shortcut to a file returnes an empty screen, and the source...
2
by: Benjamin | last post by:
I have a very strange problem. I have developed a .NET solution. To set up user clients I have also included a "Deployment Project" in the solution: Using "File System Editor | User's Program...
2
by: newbie_csharp | last post by:
Hi, is there anyway to set AltN in shortcut property? thanks *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
7
by: Paul Mars | last post by:
How can I make a shortcut to the exe in bin. I want this shortcut in root application dir. However, it can not use the entire path. It needs to just look from root down two levels to bin, not...
2
by: Mark | last post by:
I have a shortcut on the desktop in my application that I want a user to drop a file on and then have the application run. The shortcut that installs with the application does not look like you...
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: jojo41300000 | last post by:
Hi, I am trying to create a shortcut icon on Today in window mobile 5.0. I have a CAB file which will install the program and create the shortcut icon in Today. The CAB file sucessfully...
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...
5
by: remya1000 | last post by:
i'm using VB.NET 2003 application program. by using OpenFileDialog, we can select the file name or file path. OpenFileDialog1.ShowDialog() pgmPath.Text =...
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
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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: 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.