Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Line Printing - Getting the Unable to Initialize Device error

Status
Not open for further replies.

MikeDamone

Programmer
Oct 21, 2003
106
US
I have a program that will run on many different PC's that needs to print. The PC's come in all shapes and sizes. Windows 7, Vista and XP. The PC's will be connected to a local printer via Parallel and/or Serial ports.

The solution was to create a generic/text only printer on each PC named MyPrinter. MyPrinter would be configured to point to the port (Parallel or Serial) that was necessary for that PC. MyPrinter would then be shared. Doing it this way allowed us to handle the different types of hardware we had to deal with and just issue the command to MyPrinter and let Windows handle it from there.

It works fine on Windows Vista and Windows 7. However the same command is giving us an error in XP.

We are issuing this at the command line:

print /d:\\localhost\MyPrinter c:\filename.txt

and getting this error in XP

Unable to initialize device MyPrinter

We got the same error above in Vista and 7 until we shared the printer. The printer is shared on the XP PC but we still get the error. Any ideas? Is sharing different in XP?

 
Don't know if it relates but had issues in printing from Unix to XP where the XP needed an addional port opened to allow a check for status.

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top