Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Windows XP machine that runs two applications and both print on a thermal printer connected by a serial port.

For one application, the "Generic / Text Only" printer must be present, for the other to work I need to remove it.

I've found a few .vbs scripts, but they are for network printer. How do I make them work with my local printer? Is there a better solution? The user would have to run the script every time he needs to switch from an application to another.

share|improve this question
up vote 0 down vote accepted

delete local printer:

rundll32 printui.dll,PrintUIEntry /dl /n "HP DesignJet 755CM/PS" 

install local printer:

rundll32 printui.dll,PrintUIEntry /if /b "HP DesignJet 755CM/PS" /f  "%windir%\inf\ntprint.inf " /r "FILE:" /m "HP DesignJet 755CM/PS"

Set printer as default:

rundll32 printui.dll,PrintUIEntry /y /n "HP DesignJet 755CM/PS"
share|improve this answer
Works! But I just needed to change "FILE:" to "COM1:" – GxFlint Jun 29 '13 at 22:07
@GxFlint That's right. At the moment I do not have a printer with COM port. This example will work almost everywhere on a family windows. – STTR Jun 30 '13 at 10:50

I do not have the capabilities yet to ask questions in a comment, so I'm going to try and help with an answer... Yes you can write VBS which would be handy to have for switching printers, but are you writing the VBS to change defaults or actually "remove" it as in uninstall? And is this one printer or two? It seems from your question that two applications print from the same printer.

I do know with some programs you can actually set a printer for that program even if the default printer is a different one (using MS Access as an example).

If the user is not able to change printers with their level of permissions then you will probably have to have a piece of script to override and change it for them.

share|improve this answer
It's just one printer that is shared by the applications. For one of them to use it, the printer needs to be "removed" uninstalled. It's not about the default printer. – GxFlint Jun 29 '13 at 19:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.