WinPrint command from command line?

How can i "emulate" the NT print command (right mouseclick on file -> Print) by command line? The command line command "print" is not useful due to missing application connections, eg. print .doc or .xls documents with right mouse click on file. Maybe a shell32.dll function call via rundll32? Please help...
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

LuitzenConnect With a Mentor Commented:
I you know the application to print with jou can always check the registry CLASSES key for the complete print command (find the extension and examine that key) Then you might get the print command for an specific application.
By example: check the .cmd extension: points to cmdfile. check the cmdfile: shell\print\command says: %SystemRoot%\System32\NOTEPAD.EXE /p %1
You will have to write a different print command, batch file for each application. You could call the one for .doc file Wordprt and so on.

It is possible to start an application and tell it to print the file by command line startup options perhaps of the form "Winword.exe /P filename". I am not 100% certain of all the options but a rummage in the File association in " Windows Explorer/ View/ Options/ File Type" menu for Microsoft word documents might yeild a few clues.
Goesta_StoeckelmannAuthor Commented:
Good answer, but how can i pass the dde commands needed by e.g winword to print then?
All Courses

From novice to tech pro — start learning today.