Здравствуйте, SergH, Вы писали:
SH>Здравствуйте, Deus, Вы писали:
D>>Будешь смеятся, но я это уже сделал
D>>Тока не помогает.
D>>Фар делает кучу различных телодвижений, по всякому пристраивается к этому несчастному ярлыку, лазит в реестр, но команды на запуск у меня не отловилось...
D>>Так же я залез в потроха эксплорера, но там вообще глухо...
SH>Не, либо ты не понял что я советовал, либо я не понял, что ты сделал. Я имел ввиду перехватить CreateProcessA/W, ShellExecute[Ex]A/W, WinExecA/W + может ещё что-то и выводить в файл параметры с которыми они вызываются Фаром или Эксплорером. Я так делал в подобной ситуации (есть программа, которая ДЕЛАЕТ, а моя, такая же — как об стену лбом..) — помогло.
Второе

Я юзаю ApiSpy32 by Matt Pietrek.
Когда я натравливаю его на фар и открываю этот lnk, то вижу, что фар делает кучу телодвижений типа:
GetFileAttributesA(LPSTR:0012AFC0:"far.lnk")
GetFileAttributesA returns: 20
CreateFileA(LPSTR:0012AFC0:"far.lnk",DWORD:80000000,DWORD:00000003,LPDATA:0012AB9C,DWORD:00000003,DWORD:00000020,HANDLE:00000000)
CreateFileA returns: 68
GetFileType(HANDLE:00000068)
GetFileType returns: 1
...
OemToCharA(LPSTR:0012AFC0:"far.lnk",LPSTR:00126AB8:"")
OemToCharA returns: 1
...
RegQueryValueA(HANDLE:80000000,LPSTR:00129221:".lnk",LPSTR:00127A64:"рЭ",LPDATA:00127AB8)
RegQueryValueA returns: 0
RegOpenKeyA(HANDLE:80000000,LPSTR:00127A64:"lnkfile\sh",LPDATA:00127AB4)
RegOpenKeyA returns: 2
...
SetFileApisToOEM()
SetFileApisToOEM returns: 77F5B9BF
...
GetTickCount()
GetTickCount returns: 2FCD34
GetConsoleScreenBufferInfo(HANDLE:0000000F,LPDATA:00127AAC)
GetConsoleScreenBufferInfo returns: 1
а потом сразу
GetExitCodeProcess(HANDLE:00000000,LPDATA:00129DDC)
GetExitCodeProcess returns: 0
SH>Кстати, через COM никак ярлыки нельзя запускать? Был же интерфейс IShellLink, если не ошибаюсь..
Почему был? Он и щас есть...
IShellLink supports the following methods:
GetArguments Retrieves the command-line arguments associated with a shell link object.
GetDescription Retrieves the description string for a shell link object.
GetHotkey Retrieves the hot key for a shell link object.
GetIconLocation Retrieves the location (path and index) of the icon for a shell link object.
GetIDList Retrieves the list of item identifiers for a shell link object.
GetPath Retrieves the path and file name of a shell link object.
GetShowCmd Retrieves the show (SW_) command for a shell link object.
GetWorkingDirectory Retrieves the name of the working directory for a shell link object.
Resolve Resolves a shell link by searching for the shell link object and updating the shell link path and its list of identifiers (if necessary).
SetArguments Sets the command-line arguments associated with a shell link object.
SetDescription Sets the description string for a shell link object.
SetHotkey Sets the hot key for a shell link object.
SetIconLocation Sets the location (path and index) of the icon for a shell link object.
SetIDList Sets the list of item identifiers for a shell link object.
SetPath Sets the path and file name of a shell link object.
SetRelativePath Sets the relative path for a shell link object.
SetShowCmd Sets the show (SW_) command for a shell link object.
SetWorkingDirectory Sets the name of the working directory for a shell link object.
Можно конечно вытащить из ярлыка название файла и запускать вручную, но это не подходит, ибо в ярлыке лежит куча вещей типа шрифта для консоли, параметров совместимости, etc...