In InstallShield 5.1 funktioniert QueryProgItem() nicht fr Startmeneintrge,
deren Pfade Umgebungsvariablen enthalten. Unter
support.installshield.com/resource/IsFuncExt.asp ist eine DLL verfgbar, die
dieses Problem behebt. Leider liefert diese DLL nicht so viele Informationen
wie QueryProgItem(). Viel nachteiliger fr mich war, dass die von der DLL
zurckgegebenen Pfade im 8.3-Format sind.
Die von mit geschriebene DLL ist als Ersatz fr QueryProgItem() gedacht. Sie
liefert alle Informationen, die QueryProgItem() lieferte, und sie funktioniert
fr Pfade mit Umgebungsvariablen.
Zur Benutzung der DLL ist folgendes zu beachten:
a) szLink muss der vollstndige Pfad eines Startmeneintrags sein (siehe
   Beispiel).
b) Alle bergebenen Strings mssen mindestens MAX_PATH (also 260) Zeichen lang
   sein. Fr 32-Bit-Installationen betrgt die Standardlnge eines Strings 512
   Zeichen, womit diese Forderung erfllt sein sollte.


Using InstallShield 5.1, the function QueryProgItem() doesn't work for start
menu entries with paths containing environment variables. There is a DLL
available at support.installshield.com/resource/IsFuncExt.asp that covers this
problem. Unfortunately this DLL doesn't provide as many information as
QueryProgItem() does. More disadvantageous to me was, that the returned paths
are in the 8.3-format.
This DLL i wrote is a replacement for QueryProgItem(). It returns as many
information as QueryProgItem() does and it works for paths containing environ-
ment variables.
Note:
a) szLink has to be the fully qualified name of the start menu entry (see
   example below).
b) All strings have to be at least MAX_PATH (i. e. 260) characters long. For
   32 bit installations the default string length is 512 characters, so this
   should be no problem.


Beispiel/Example:
prototype BOOL Shortcut.QueryShortcut(STRING, BYREF STRING, BYREF STRING,
  BYREF STRING, BYREF STRING, BYREF NUMBER, BYREF STRING, BYREF NUMBER);

STRING szLink, svPath, svArgs, svWorkDir, svIconPath, svKey;
NUMBER nvIconIdx, nvFlags;
BOOL bResult;

ProgDefGroupType(COMMON);
UseDLL(SUPPORTDIR ^ "Shortcut.Dll");
szLink = FOLDER_PROGRAMS ^ "Verwaltung (Allgemein)" ^ "Systemmonitor.lnk";
bResult = QueryShortcut(szLnk, svPath, svArgs, svWorkDir, svIconPath, nvIconIdx,
  svKey, nvFlags);
if (bResult) then
  SprintfBox(WARNING, "", "Link: %s\nPath: %s\nArguments: %s\nWorking " +
    "Directory: %s\nIcon Path: %s\nIcon Index: %d\nShortcut Key: %s\n"
    "Window Flags: %d", szLnk, svPath, svArgs, svWorkDir, svIconPath, nvIconIdx,
    svKey, nvFlags);
else
  MessageBox("Error calling QueryShortcut()", WARNING);
endif;
UnUseDLL("Shortcut.Dll");
