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

COM WSH - About the IWshShortcut method (SOS!)

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
2 2318
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
sos
by: Goofy | last post by:
Hi all, i am trying to write php scripts using notepad but everytime i opened it, it automatically disappears after a few seconds. it is really frustruating. i cant write code. what can i do?
1
by: kepes.krisztian | last post by:
Hi ! I don't understand something: See that code: class A(object): __slots__=('x','a','__v') def __init__(self): self.__v=0 def g(self):
14
by: mich | last post by:
Hi I am trying to use Windbg with SOS.dll on VS 2003 by following the article "SOS:It's Not Just an ABBA Song Anymore" at http://msdn.microsoft.com/msdnmag/issues/03/06/Bugslaye I tried the...
1
by: Kenny | last post by:
Hi, How a project can be simultanously working by 2 or more person? It looks to me the Re-compile is compiling for the whole project.. If I check out 1 page and you check out one page.. Then I...
0
by: Giovane Calabrese | last post by:
ok. im try to make a multilanguage system based on that tutorial : http://www.123aspx.com/redir.aspx?res=29112 in my aspx pages all text are in labels , and i want to take the name labels...
29
by: Patrick | last post by:
I have the following code, which regardless which works fine and logs to the EventViewer regardless of whether <processModel/> section of machine.config is set to username="SYSTEM" or "machine" ...
1
by: David Douglass | last post by:
I've been trying to get my hands around the version of SOS that ships with framework 2.0. I wrote a sample app to create the classic deadlock situation. When I run syncblk, I get told which locks...
2
by: johnxhc | last post by:
I am trying to use sos extension but almost half of the sos command do not work, for example 0:027!findtable No export findtable found 0:027!bpmd No export bpmd found 0:027!GCHandleLeaks...
12
missshaikh
by: missshaikh | last post by:
Rick Byers : Func-eval can fail while stopped in a non-optimized managed method that pushes more than 256 argument bytes check the above URL i have same error "Cannot evaluate expression...
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: 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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.