in reply to printing an html file to a printer on windows

Try it like this:

use strict; use Win32::FileOp qw(ShellExecute); ShellExecute Print => "G:\\dev\\win32\\test.html";

If this doesn't work, try to run regedit.exe and see whether there actually is a Print action defined for extension .html. (See HKEY_CLASSES_ROOT\.html, look at the default value, then look into HKEY_CLASSES_ROOT\<that value>\shell and see if there is a Print subkey.)

Also, not sure it's the problem, but I use new Win32::API("shell32", "ShellExecute", ['N','P','P','P','P','N'], 'I'), that is ShellExecute instead of ShellExecuteA and with a bit different options.