Didn't get anywhere with commandline so wrote a small app.
#include <windows.h>
#include <htmlhelp.h>
int WINAPI WinMain(HINSTANCE hinst, HINSTANCE hinstPrev,
CHAR *lpCmdLine, int nCmdShow)
{
char s[400];
strcpy(s, lpCmdLine);
HH_AKLINK link;
link.cbStruct = sizeof(HH_AKLINK);
link.fReserved = FALSE;
link.pszKeywords = s;
link.pszUrl = NULL;
link.pszMsgText = "HtmlHelp Error";
link.pszMsgTitle = NULL;
link.pszWindow = NULL;
link.fIndexOnFail = FALSE;
HWND h = HtmlHelp(GetDesktopWindow(),
"D:\\help.chm",
HH_KEYWORD_LOOKUP, (DWORD) & link);
while(IsWindow(h)){
Sleep(100);
}
return (0);
}
John