Why won't rundll batch file command delete printers?

Archived from groups: microsoft.public.windowsxp.print_fax (More info?)

I've been testing out the following line in a batch file on a Windows XP
machine in an attempt to delete a printer from the comptuer:

rundll32 printui.dll,PrintUIEntry /dn /n\\computer8\NEWSLASER2

There is no doubt whatsoever that the computer name and the share name are
correct, but this always generates the following error:

"Printer connection cannot be removed. Either the printer name was typed
incorrectly, or the specified printer has lost its connection to the server.
For more information, click Help."

Of course, the help doesn't have anything on the subject, and I know the
printer name is correctly entered. Also, the printer seems to be connected
to the server. (I don't even know why it should care about the connection,
just remove the printer from this computer's listings).

The computer which is sharing the printer is a Windows 95 machine. I'm also
having the same issue on two Windows 98 SE machines which are both sharing a
printer. However, I can successfully delete, using this method, printers
which are connection to our Windows 2000 Server print server.

Any ideas why this happens, and what I might do to correct it?

Thanks

Pat Furrie
WESH-TV, Orlando
1 answer Last reply
More about rundll batch file command delete printers
  1. Archived from groups: microsoft.public.windowsxp.print_fax (More info?)

    "connections" to Win98, Unix Samba, and Novell shared printers are actually
    local printers.

    --
    Alan Morris
    Windows Printing Team
    Search the Microsoft Knowledge Base here:
    http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

    "Pat Furrie" <PatFurrie@discussions.microsoft.com> wrote in message
    news:B92D4115-6836-4274-A00D-DB721E672AAA@microsoft.com...
    > I've been testing out the following line in a batch file on a Windows XP
    > machine in an attempt to delete a printer from the comptuer:
    >
    > rundll32 printui.dll,PrintUIEntry /dn /n\\computer8\NEWSLASER2
    >
    > There is no doubt whatsoever that the computer name and the share name are
    > correct, but this always generates the following error:
    >
    > "Printer connection cannot be removed. Either the printer name was typed
    > incorrectly, or the specified printer has lost its connection to the
    server.
    > For more information, click Help."
    >
    > Of course, the help doesn't have anything on the subject, and I know the
    > printer name is correctly entered. Also, the printer seems to be
    connected
    > to the server. (I don't even know why it should care about the
    connection,
    > just remove the printer from this computer's listings).
    >
    > The computer which is sharing the printer is a Windows 95 machine. I'm
    also
    > having the same issue on two Windows 98 SE machines which are both sharing
    a
    > printer. However, I can successfully delete, using this method, printers
    > which are connection to our Windows 2000 Server print server.
    >
    > Any ideas why this happens, and what I might do to correct it?
    >
    > Thanks
    >
    > Pat Furrie
    > WESH-TV, Orlando
Ask a new question

Read More

Connection Printers Command Prompt Windows XP