Hello all, I'm not having any luck finding a way to delete a printer from windows 2000 from .net code or the command prompt. I don't know if it makes any difference, but the printers that I am looking to delete are automatically created by Remote Desktop when users sign on. Windows does not always delete them so I want to try to clean them up automatically myself.
I've tried the Win32_Printer WMI class, but it says that it does not support being deleted (I think that it might in XP and 2003, but I'm using 2000.)
I've also been trying rundll32 printui.dll,PrintUIEntry. Lots of sites list examples of how to create and delete printers, but the delete part does not work as they have documented it.
I looked at the net command in dos, but the printers I'm looking to delete do not show up in there.
Any help would be greatly appreciated. Thanks!
I've tried the Win32_Printer WMI class, but it says that it does not support being deleted (I think that it might in XP and 2003, but I'm using 2000.)
I've also been trying rundll32 printui.dll,PrintUIEntry. Lots of sites list examples of how to create and delete printers, but the delete part does not work as they have documented it.
I looked at the net command in dos, but the printers I'm looking to delete do not show up in there.
Any help would be greatly appreciated. Thanks!