Removing printers remotely?

L

Linn Kubler

Hi,

I setup a GPO to not allow my users to add or remove printers and it works
good. Almost too good. Now I have a user with a printer that was installed
prior to my policy and she wants it removed. Is there a way to remove a
printer remotely from her profile? I know how to add and remove global
printers on a workstation using the rundll32 printui.dll, PrintUIEntry /ga
command. But I don't see how I can remove a printer from a specific user's
profile.

Any help is greatly appreciated.

Thanks,
Linn
 
A

Alan Morris [MSFT]

The user can use the prnmngr.vbs file in system32.

The policy you set only stops users from adding or deleting printers from
the UI. All spooler api calls will succeed.

The user will need to run this or you can run this when the user is logged
on.
prnmngr /?

prnmngr -d -p \\server\printer

If you do not want the users to realize they can in fact add and delete
printers you can use the registry information.
=======================
You can remotely remove the printer from the registry (I assume you have
admin rights on the remote system).

HKCU\printers\connections

just delete the key for the old printer then stop/start the spooler

sc \\userscomputername stop spooler
sc \\userscomputername start spooler


I hope this information is useful to others as well as yourself.
--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.
 
L

Linn Kubler

Thanks for the info Alan, good tips. I decided to look at the rundll32
printui.dll, PrintUIEntry command a bit closer and found that I could remove
the printers from the user using it after all. I logged in as the user and
typed the following at a command prompt.

rundll32 printui.dll, PrintUIEntry /dn /n\\server\printer share

and that removed the printer. You are right, my policy only stops them from
installing or deleting printers via the GUI. Fortunately my users aren't
computer savy enough to find a command like the one above so it works for
me.

Thanks again,
Linn

Alan Morris said:
The user can use the prnmngr.vbs file in system32.

The policy you set only stops users from adding or deleting printers from
the UI. All spooler api calls will succeed.

The user will need to run this or you can run this when the user is logged
on.
prnmngr /?

prnmngr -d -p \\server\printer

If you do not want the users to realize they can in fact add and delete
printers you can use the registry information.
=======================
You can remotely remove the printer from the registry (I assume you have
admin rights on the remote system).

HKCU\printers\connections

just delete the key for the old printer then stop/start the spooler

sc \\userscomputername stop spooler
sc \\userscomputername start spooler


I hope this information is useful to others as well as yourself.
--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no
rights.

Linn Kubler said:
Hi,

I setup a GPO to not allow my users to add or remove printers and it
works good. Almost too good. Now I have a user with a printer that was
installed prior to my policy and she wants it removed. Is there a way to
remove a printer remotely from her profile? I know how to add and remove
global printers on a workstation using the rundll32 printui.dll,
PrintUIEntry /ga command. But I don't see how I can remove a printer
from a specific user's profile.

Any help is greatly appreciated.

Thanks,
Linn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top