Solved

printui

Posted on 2014-01-20
7
995 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
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…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…

813 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

9 Experts available now in Live!

Get 1:1 Help Now