|
-
Feb 8th, 2001, 05:13 PM
#1
Thread Starter
New Member
Does anyone know if there are any API functions that enable me to do the following:-
1. Create, edit and query the properties of a windows shortcut file ('.lnk' file as appears on desktop)
2. Create, edit and query the properties of an internet shortcut file ('.url' file as appears in "c:\windows\favourites...")
I already have a third party DLL that allows me to do point number 1 above but would like to know how the underlying code works. I have no current way of acheiving point number 2.
Thanks.
-
Feb 10th, 2001, 03:50 AM
#2
Have you thought about simple file i/o? Load the shortcut into memory? They have a standard layout.
-
Feb 10th, 2001, 05:49 AM
#3
Addicted Member
You Can get The Help Of Windows Scripting Thru VB.
You can Also Create Shortcuts Using APIs. For Details EMail Me.
-
Feb 10th, 2001, 05:53 AM
#4
Addicted Member
You Can Create A Shortcut file and place it in the desktop using Windows Scripting and VbScript In Visual Basic. For Details EMail Me.
-
Feb 10th, 2001, 05:55 AM
#5
Addicted Member
You Can Use Windows Scripting And VBScript Inside Visual basic Code To Create A Shortcut And Place It On Desktop. For Source Code EMail Me.
-
Feb 10th, 2001, 06:45 AM
#6
Thread Starter
New Member
Thanks for the replies.
I've looked at the WshShell.CreateShortcut method which seems to work OK for creating new shortcuts, but how can I find the properties of an existing shortcut or edit an existing shortcut.
The Wscript object model does not expose the shortcut object directly, only through the CreateShortcut method.
If there was a GetShortcut method, this would solve my problem. But without that, I thought there might be an API function that I could use.
-
Feb 11th, 2001, 02:42 AM
#7
Addicted Member
My System Was Suffering From IE Syndrome. So I Didn't Actually Know That I've Posted 3 Replies.
AllRight, That Doesn't Matter Much.
U Can Also Use The APIs For Creating Shortcuts. Here Is A function For Adding Shortcut To Start Menu.
declare function fCreateShellLink lib "STKIT432.dll" (byval lpstrFolderName as string,Byval lpstrLinkName as string,byval lpstrLinkPath as string,byval lpstrLinkargs as string)
I Also Think There May Be A Mechanism For Reading Shortcuts In that API.
-
Feb 11th, 2001, 09:33 PM
#8
Fanatic Member
Internet shortcuts are basicly INI Files, so you can use the standard INI Api Functions (ReadPrivateProfileString and WritePrivateProfileStirng(i think)) to read and write to them. open one up in notepad to see what i mean.
Good Luck!
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Oct 11th, 2009, 06:29 PM
#9
New Member
Re: Creating/Editing Shortcut files (.lnk, .url)
I've found this code
http://www.planetsourcecode.com/vb/s...42621&lngWId=1
which works fine for me.

EladKarako
-
Oct 13th, 2009, 03:10 AM
#10
Re: Creating/Editing Shortcut files (.lnk, .url)
wow this brings back memories. This question is 8 years old.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|