Solved

printui

Posted on 2014-01-20
7
1,031 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows 7 temp directory filling up with CAB files... 7 126
VMware-ClientIntegrationPlugins 6 81
Printing labels from Excel 2 24
Windows 10 ISO build version 3 50
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…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
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…
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…

733 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