Solved

printui

Posted on 2014-01-20
7
963 Views
Last Modified: 2014-01-21
I'm trying to get good with printui because it will come in handy in my work environment. so I am trying to delete a locally installed printer, and I use this command at the command prompt

rundll32 printui.dll,PrintUIEntry /dl /n\NameOfPrinter

but it doesn't work. I'm assuming I have a syntax error because I can add the printer, so I should have permissions to delete it.
also I rebooted after running this command, in case the print spooler needs to be restarted.
So, any ideas what I am doing wrong?
0
Comment
Question by:JeffBeall
  • 4
  • 3
7 Comments
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39794811
  /dd delete printer driver
   /dl delete local printer

Here is the article on using PrintUi Commands

or you can use this option to delete drivers

printui /s /t2

Open in new window


example
RUNDLL32 PRINTUI.DLL,PrintUIEntry /dd /c\\machine /m "model name" /h "driver architecture" /v "driver version"

Open in new window


/h      driver architecture, one of the following:
Alpha | Intel | Mips | PowerPC

Plus here are some good example in this link Command Line Printer Control
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 39794956
thank you for the response, I have a question though
wouldn't /dl delete the printer listed in devises and printers. So if my printer is called
printer123 and it is on print server server123 so that in devises and printers it is listed as

printer123 on server123

then shouldn't

rundll32 printui.dll,PrintUIEntry /dl /n\printer123

work?
0
 
LVL 14

Accepted Solution

by:
comfortjeanius earned 500 total points
ID: 39795270
Are you trying to perform the action from a remote machine, then you will need to use /c

rundll32 printui.dll,PrintUIEntry /dl /n "Test Printer" /c\\SERVER
or
rundll32 printui.dll,PrintUIEntry /gd /c\\COMPUTER_NAME /n"\\PRINTSERVER\PRINTERNAME"

Open in new window

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:JeffBeall
ID: 39798122
sorry, i didn't see your responce until now.

so is /n  something like name

and /c something like computer?

which is why after /c you have \\computer_name or \\server and after /n you have "test printer"
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39798135
/c[name] unc machine name if the action is on a remote machine
and
/n[name] printer name
0
 
LVL 1

Author Closing Comment

by:JeffBeall
ID: 39798271
thank you so much for the help.
I wanted to hurry and accept this answer so that you get all the points, because you deserve it.
are you a programmer? is that how you know this stuff?
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39798309
No a IT Administrator but researching and finding different ways in skinning a cat....
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I hope this helps those who have been battling the SanDisk / U3 problem for a while. For anyone that is running Windows 7 64bit and is receiving and searching the internet for the “Windows Error: Windows has allocated a drive letter to the U3 dri…
Printers have changed substantially in the last 30 or so years, not just in technical capabilities but in cost and usage as well.  Printers were originally used for interfacing with the operator, not necessarily for printing copy or pictures. In …
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now