Во первых а на фига это ?
Во вторых на DOS программу, .bat файл (.pif) или на документ / Win программу
(.lnk) (это не одно и то же) ?
В третьих, а не лучше ли использовать в качестве ярлыка .url файл ?
Не испытывал для не url целей, но наверное подойдёт.
Настоящие ярлыки, если я правильно понял, ещё и от версии к версии Win
меняются, наверное сохраняя обратную совместимость. Для их создания
там есть API.
Формат URL файла:
From: Edward Blake <blak***@r*****.ca>
Subject: The URL format
The url file format looks pretty simple, it has the
same format as a INI file:
[InternetShortcut]
URL=http://www.someaddress.com/
WorkingDirectory=C:\WINDOWS\
ShowCommand=7
IconIndex=1
IconFile=C:\WINDOWS\SYSTEM\url.dll
Modified=20F06BA06D07BD014D
HotKey=1601
URL Is Self-explanatory
WorkingDirectory Is Self-explanatory
IconIndex Is:
The Icon Index within IconFile
IconFile Is:
A File containing a icon
ShowCommand Is:
(Nothing) - Normal
7 - Minimized
3 - Maximized
HotKey Is:
833 - Ctrl + Shift + A
834 - Ctrl + Shift + B
835 - Ctrl + Shift + C
836 - Ctrl + Shift + D
837 - Ctrl + Shift + E
838 - Ctrl + Shift + F
.
.
1601 - Ctrl + Alt + A
1602 - Ctrl + Alt + B
1603 - Ctrl + Alt + C
1604 - Ctrl + Alt + D
1605 - Ctrl + Alt + E
1606 - Ctrl + Alt + F
.
.
.
Описания .LNK формата у меня нет, а вот формата .PIF файла вроде есть
(не уверен что именно то, но похоже)
Appendix A: Program Information Files
Program Information Files (PIF) are used by DESQview when loading a
program to determine such things as how much memory the program needs,
what the default directory should be, and how well-behaved the program
is. They are usually created and modified by using the Add a Program
and Change a Program options from the Open Window menu. The resulting
file is given a name of the form xx-PIF.DVP where "xx" is the 2-key
combination used to invoke the program from the Open Window menu.
This Appendix describes the format of these Program Information Files.
The first 369 bytes of the PIF are the same as for Topview. They are:
offset length use
0 2 reserved
2 30 program title (blank filled)
32 2 maximum memory required in K-bytes
34 2 minimum memory required in K-bytes
36 64 command to start program - zero terminated
100 1 default drive in ASCII (A,B,etc.)
101 64 default directory name - zero terminated
165 64 program parameters - zero terminated
229 1 initial screen mode (0-7)
230 1 # of text pages used by the application
231 1 # of first interrupt vector to be saved
232 1 # of last interrupt vector to be saved
233 1 # rows in logical window buffer
234 1 # columns in logical window buffer
235 1 row # for initial window position
236 1 column # for initial window position
237 2 system memory size in K-bytes
239 64 shared program file name - zero terminated
303 64 shared program data - zero terminated
367 1 control byte 1 - encoded as follows:
80H - Writes text directly to screen
40H - Foreground only
20H - Uses math coprocessor
10H - Accesses system keyboard buffer
01H - Swappable
368 1 control byte 2 - encoded as follows:
40H - Uses command line parameters
20H - Swaps interrupt vectors
The next 13 bytes are optional. They represent extensions available
in all versions of DESQview.
offset length use
369 2 keys-to-use on Open Window menu ("DS" for DOS
Services for example)
371 2 size of script buffer in bytes
373 2 automatically PAUSE after this many tests for keyboard
input in one clock tick (normally 0)
375 1 non-zero to disable automatic color mapping
376 1 non-zero if application is swappable
377 3 reserved - should be 0
380 1 non-zero to automatically close application on exit
381 1 non-zero if copy-protect disk is required
The next 34 bytes are optional. They represent extensions available
in DESQview version 2.00 and later.
offset length use
382 1 reserved - .DVP format number encoded as follows:
00H = DESQview version 1.20 and later
01H = DESQview version 2.00 and later
02H = DESQview version 2.20 and later
383 1 reserved - should be 0
384 1 initial # rows in physical window
385 1 initial # columns in physical window
386 2 maximum expanded memory available to program
in K-bytes
388 1 control byte 3 - encoded as follows:
80H = automatically assign position
20H = maximum memory value has been specified
10H = disallow Close command
08H = foreground-only when doing graphics
04H = don't virtualize
389 1 keyboard conflict level (0-4, normally 0)
390 1 # graphics pages used by program
391 2 extra system memory size
393 1 initial screen mode for program (normally 0FFH)
The next 3 bytes are optional. They represent extensions available
in DESQview version 2.20 and later.
offset length use
394 1 serial ports usage (normally 0FFH)
-1 = use all serial ports
0 = not using serial ports
1 = use COM1 only
2 = use COM2 only
395 1 control byte 4 - encoded as follows (normally C3H)
80H = automatically close application on exit
if .COM or .EXE extension specified
40H = swappable if not using serial ports
08H = virtualize text - overrides previous value
04H = virtualize graphics - overrides previous value
02H = share CPU when foreground
01H = share EGA when foreground and zoomed
396 1 degree of protection
397 19 reserved
Note: For all control bytes, undefined bits should be set to zero for future
compatibility.
-*Название листа "Linux: разрешение вопросов, перспективы и общение";
Написать в лист: mailto:comp.soft.linux.discuss-list@subscribe.ru
Адрес правил листа http://subscribe.ru/catalog/comp.soft.linux.discuss/rules
Номер письма: 20964; Возраст листа: 757; Участников: 1399
Адрес сайта рассылки: http://www.linuxrsp.ru
Адрес этого письма в архиве: http://subscribe.ru/archive/comp.soft.linux.discuss/msg/420704