The default printto verb for html files on windows is ofcourse IE.
IE6 however invoke a pop up dialog for the user during printto opperation. It's nice as long as the application is not a server one.. (no UI).
It took me a while to understand that this issue is a browser implementation and I was convinsed so after reading many posts about this in google discussion groups searches.
Most of the people by the way encountered the problem while developing FAX servers using MS FAX services (COM).
The solution is ofcourse to use other browser.
Netscape� Communicator 4.79 is the one that does the job silently as expected (NOT netscape 7.02...), it has to be set as the default browser on the machine.
If you don't want it to be the default browser set the Registry- html files printto only: (HKLM\Software\Classes\htmlfile\shell\printto\) to the values that netscape set them to when it's the default browser. (That way only the printto operation is done through netscape).
The other solution is to use MS-Word as I've already described in my previous post.
Sorry, but your solution doesn't solve the problem of print dialogs.
The idea was to prevent user dialogs from appearing for server based applications. (No UI!)
The solution is to edit the printto verb inside "Assaociated File Types" to a program that can do it without dialogs.
This is not a perfect solution since the program is MS-WORD.
If you have another software for coverting\printing html without dialogs please add a comment. (A freeware or a built in program in Windows!)
Application used to ... :
"C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE" /n /dde %1 %2
[REM _DDE_Minimize][FileOpen("%1")][FilePrintSetup "%2 on p",.DoNotSetAsSysDefault=1][FilePrint 0][DocClose 2][FilePrintSetup ""]
DDE Application not running:
[FileOpen("%1")][FilePrintSetup "%2 on p",.DoNotSetAsSysDefault=1][FilePrint 0][FileExit 2]
This method does not work with IE 6.0.
This method based on registry IE settings changing.
It modify header and footer registry settings, run IE, wait for IE exit, and restore settings back.
!!! BUT !!! IE 6.0 (and maybe IE 5.5) prints in background (hidden) process. When you run IE 6.0 process for printing HTML page and if you will think that IE 6.0 process completion is signified printing completion than you will MISTAKEN.
Where is the error?
Look at process.
1. Our program change settings.
2. Our program runs IE 6.0 main process for printing.
3. IE 6.0 main process runs hidden printing process.
4. IE 6.0 main process exits.
5. IE 6.0 hidden process shows print dialog (waits OK).
6. Our program waits until IE 6.0 main process exits. <-- This is ERROR!
7. Our program restores settings.
8. IE 6.0 hidden process read settings (it's restored (not our) settings).
9. IE 6.0 hidden process prints.
10. IE 6.0 hidden process exits.
In 6. our program must wait IE 6.0 hidden process completion but not main process completion!
!!! BUT !!! There is not way for taking IE 6.0 hidden process handle.