By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

COM WSH - About the IWshShortcut method (SOS!)

P: n/a
It appears I can only create a shortcut for files that exist?

Are the shortcuts actually registry entries?

I am tasked with programmatically creating shortcuts for files that will
exist on another server. The .lnk files will be accessed from a share. If
they are registry entries than I guess they are forever tied to the machine
that they were created on?

What is the best way to go about making stand alone .lnk files if possible?

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
SuperDrone wrote:
Are the shortcuts actually registry entries?
I'm no expert on shortcuts but I know a little about them.

Shortcuts are just files. If you create a shortcut (called "Test") on your
root C: drive and then open a CMD window and run a DIR command, you'll see
that the shortcut is just a file with a ".lnk" (link) extension. You can
rename the file Test.lnk as Test.txt (from the CMD prompt -- not in Windows)
and then you'll see the file properly from within Windows.

If you open the file in a binary editor you'll see that it's just a binary
file with the target file location stored within it.
What is the best way to go about making stand alone .lnk files if
possible?


If you're failing to find an API that'll let you create a link to a
non-existent file, the .lnk file format itself is documented so you could
consider manufacturing one by hand. It may be more work but you've got
complete control over what goes in it that way.

Search for lnk files on the Wotsit's Format site (http://www.wotsit.org) and
you'll find several documents explaining the format of the file.

Hope that helps,

--

(O)enone
Nov 21 '05 #2

P: n/a
Thanks dude, that give me a start. I may code a binary reader and make my own
library.

I think I may have another solution but thanks for the info =)
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.