Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

printui

Posted on 2014-01-20
7
Medium Priority
?
1,097 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. 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…

722 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