"Auric__" <not.m...@email.address> wrote...
__________
|
| > (A) Opening a LNK in fact opens the target file, not the LNK file.
| > (B) Opening a URL with a GUI editor causes a crash of the editor.
|
| 'notepad filename.lnk' works as expected for me. I end up with binary gibberish in the editor, but no crash.
|
¯¯¯¯¯¯¯¯¯¯
(A) ' Notepad filename. L N K ' doesn't crash.
(B) ' Notepad filename. U R L ' causes the trouble.
However, you're right: 'notepad filename. L N K' -- via CONSOLE, or via START->RUN -- opens the file itself, and not the target.
What I tried so far was:
(1) open the notepad;
(2) open the file from INSIDE the notepad --> And THIS opens the target instead of the LNK file.
Whereas:
(1) open the console or START>RUN;
(2) open an editor and the LNK file TOGETHER with ONE single command --> opens the LNK file, not the target. 'EDIT %1' or 'NOTEPAD %1' doesn't matter.
I just forgot that from windows command line I can open native windows files too, so I can use 'notepad' in the same way as the 'edit' command.
To my excuse: last time I used DOS was about two or more decades ago. Native MS-DOS 3.x, or 5.x or so. No way to run a windows exe file from a DOS prompt, back then.
__________
|
| You can edit it via the Windows API, but I don't know what is needed. Personally, I would ask in comp.os.ms-windows.programmer.win32. (You'll probably need something besides batches to do this, but who knows.) […]
|
| > (B) Opening a URL file […]
|
| Does it *have* to be a batch file? This one *can* be done in batches, but it really strikes me as something more suited to a non-scripting language. I would do this job in, say, Qbasic, or a modern compiled language.
|
¯¯¯¯¯¯¯¯¯¯
No, it doesn't HAVE to be a batch file. That's just something I've already dealt with (decades ago). :-/
__________
|
| Time stamps can be edited with something like 'touch' (a utility from the *nix world, which should be available in MinGW, GNUwin32, and other *nix-on-Windows systems), and that is easily scriptable.
|
¯¯¯¯¯¯¯¯¯¯
Roger that. Thanks for the hint!
__________
|
| Changing the icons... that, I don't know. It depends on how that is stored, something I know nothng about.
|
¯¯¯¯¯¯¯¯¯¯
Changing the icons in URL files shouldn't be a particular problem as long as I can edit the URL file in general.
In URL files, icons are stored as plain text (see lines 4 and 5):
> ========== *.URL ==========
> Line 1: [InternetShortcut]
> Line 2: URL=file:///c:/targetfile.*
> Line 3: Modified=000000000000000000h
> Line 4: IconFile=c:\iconfile.dll
> Line 5: IconIndex=0
> ========== E O F ==========
OK, I'll have a look at the other answers, now.
Standby, plz!