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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Goesta_StoeckelmannAuthor Commented:
Good answer, but how can i pass the dde commands needed by e.g winword to print then?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.