We help IT Professionals succeed at work.

Print to Local USB Printer from Virtual Machine

GCITech
GCITech asked
on
8,627 Views
Last Modified: 2012-05-11
I've got a virtual machine I log into on a daily basis, and I'm having trouble being able to print to the local USB printer on my local machine. The local machine is  Win 7 Home Prem x64 machine and the virtual machine is Win XP Pro. I'm also using VMWare if that helps anything.
Comment
Watch Question

Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
Are you using RDP?
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
Does the XP Virtual Machine have the same printer driver installed, so if can complete printer drive mapping, do you also have Printing Mapping enable when you connect via RDP

Check Event logs on XP Virtual Machine for Terminal Server Printer Errors?

Do you see any client mapped printers when you select Printers on the virtual machine via RDP?

Author

Commented:
Yes I'm using RDP.

There are not any client mapped printers on the virtual machine.

I thought the drivers were installed correctly on the virtual machine, however after looking at the event log I see a 'TermServDevices' saying Driver required for printer (Make/model) is unknown. Contact the admin to install the driver before you login again.

I'm not sure what I've done incorrectly.
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
You need to install the printer driver for your USB printer on the XP virtual machine.

Author

Commented:
I'm unsure how to install the printer drivers without the printer being attached. When I launch the *.exe for the printer driver it copies some files then says 'make sure the printer is connected'. Or I can pick Manual or Cancel. I picked manual but I wasn't sure what port to assign it to. I also tried cancel then it copies more files and auto assigns it to LPT1.
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
it doesn't matter what port you assign it to, as long as it has the driver installed, as it will use passthru' to print.

Author

Commented:
I've got it assigned to LPT1 now and it says 'Ready' when I open the Printers and Faxes in Control Panel but I'm still getting the same error in the event log and it won't print.
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
any event log entries?

do you have any printers available to you in the printers when you login ?

dont print to the local printer LPT1, there should be a TSCLIENT printer?

Author

Commented:
Yes there are event log entries, identical to the one mentioned above. The only printer listed in printers after logging in is the one I just installed to LPT1.
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
this is driver for the printer you are using~?

Author

Commented:
that's correct, if you're referring to the error in the event log complaining about the driver.
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
You've got printers selected in the RDP client?

what other printers do you have on Win7 desktop?
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
add a standard printer e.g. HP LaserJet 4 on the Win7 Desktop, do you get a mapped printer when connected?
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
RDP Printing
When I connect to a XP Virtual Machine via RDP from a Windows 7 computer, if I look in the printers in the virtual XP Machine, I get them listed as per picture (TROPHEUS) is the Win7 computer.

Auto client mapping happens, now these are standard printers available to both Win7/WinXP in the standard build.

Try adding a HP LaserJet 2100 PCL 6 printer to Win7, and see if this gets auto mapped by XP.
David Johnson, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
in your rdp client in the options you do have local devices and resources and have the printers checked ??

Author

Commented:
Yeah, I'll get some screenshots in the morning to make sure we're looking at the same stuff. Thanks for the help thus far.

Author

Commented:
Here's the printers installed on Win 7 machine, RDP settings and screenshot of event log error and printer window on XP virtual machine. I went ahead and installed the Laserjet 2100 after taking these screenshots and it does show up on the virtual machine.
win7printers.jpg
win7rdpsettings.jpg
rdpsession.JPG
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
okay, so we know that RDP client printer is mapping, so there is an issue with the drivers.

Author

Commented:
Correct. I finally figured out how to install the HP Deskjet 6840 drivers on the virtual machine by using cmd prompt and "hp_driver.exe -e" that launched the installation where I could install it to any port I wanted and did not require the printer to be attached. I initially needed this to work with an Epson Stylus C88+ printer but could not get it to work so I went to the HP next because it was available for testing. I've also successfully installed the Epson drivers on the virtual machine but still get the error in the event log regarding the driver for the Epson printer. Could it be the Epson does not support this feature or should this work regardless of the make/model of the printer?
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
What can happen is how RDP printer mapping takes place is it tries to match the "name" of the printer driver" on the virtual machine with the name of the driver on the physical machine, if they are different, mapping will not take place.

Can you confirm this, are they different?

I shouldn't think 64 and 32 bit has anything to do with it, because in the example, I screenshotted, I have 32 bit XP VMs, and 64 bit Win7 and Vista machines, and client mapping works, but client printer mapping does not work with all printers.
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
I'm also wondering if USB is also the issue, as RDP does not provided any USB redirection.

Author

Commented:
I've managed to make it work on another HP printer (LaserJet 1020) both via USB. I'm wondering if the Epson is the problem, (it certainly seems that way). Yes you were correct on the driver names being different. I've attached a ss of each (local and virtual) machine to show the slight differences.
win7epsondriver.jpg
xpepsondriver.JPG
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Is it possible to change the names?
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
Check if this is the issue?

http://support.microsoft.com/default.aspx?scid=kb;en-us;q302361

there is a workaround we could try...

Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
As a workaround you could print to this computer via Printer Sharing.

So share the Printer on your Windows 7 computer, and connect to the printer from within XP Virtual Desktop.

Author

Commented:
The registry addition shouldn't be the issue ( I added that last week hoping it would resolve my issue). I think I'm going to just replace the Epson printer with one I know will work with RDP and USB redirection. Thanks for all the help. I don't know how well the printer sharing would work since the machines are on different networks and it's probably easier to just swap the Epson with a different printer. Thanks again.
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
if on different networks, the virtual machine would need network access to your Windows 7 computer.
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
you could try sharing the printer on yor Windows 7 computer, and then connect to that share and map it to itself on lpt1 and then check.
VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Ok, it all works now. Initially I tried running through your steps to create the local-remote printer>sharing it and then logged into xp machine and it still was not mapped. I went and looked at the event log and sure enough, there was another error complaining about the driver. I decided to try your suggestion from yesterday to change the name of the driver to match but I was unsure how to do so. I decided to try editing the *.inf file for the printer driver and replaced  all instances of "EPSON Stylus C88 Series" (from the XP machine) to "EPSON Stylus C88 Series (M)" which matches the Win 7 machine. After doing this both the local-remote and the original EPSON Stylus C88 Series (M) mapped and I can print to both of them. Thanks for all the help!

Author

Commented:
Couldn't have asked for better assistance. Thanks again!
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
Thanks for your kind words.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.