Announcement

Collapse
No announcement yet.

rundll32 printui.dll,PrintUIEntry Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • rundll32 printui.dll,PrintUIEntry Question

    I have a down and dirty app that deletes a bunch of printers and adds new ones. I don't care, at least at the point of adding, whether or not the printer was found or not so I am using the /q option to suppress errors. What I am finding is that if the printer can not be found it still throws the windows error saying it can not connect to the printer even though I am using the /q option. Does anyone know how I can suppress this message? Maybe that is the problem, Windows doesn't treat the can not connect to the printer as an actual error message? Is there another way I can add the printers?

    Here is the simple line of code. All I do is add the printers line by line with a shell statement

    Code:
    rundll32 printui.dll,PrintUIEntry /in /q /n\\PrimaryDomain\ExpediteRed
    Last edited by Douglas C. Horner; 15 Apr 2008, 03:14 PM.
    There is a principle which is a bar against all information, which is proof against all arguments and which cannot fail to keep a man in everlasting ignorance - that principle is contempt prior to investigation.

    Herbert Spencer

  • #2
    ????
    DeletePrinter
    The DeletePrinter function deletes the specified printer object.
    Code:
    BOOL DeletePrinter(
      HANDLE hPrinter   // handle to printer object
    );
    Parameters
    hPrinter
    [in/out] Handle to a printer object that will be deleted. Use the OpenPrinter or AddPrinter function to retrieve a printer handle.
    ???
    AddPrinter
    The AddPrinter function adds a printer to the list of supported printers for a specified server.
    Code:
    HANDLE AddPrinter(
      LPTSTR *pName,     // server name
      DWORD Level,      // printer information level
      LPBYTE pPrinter   // printer information buffer
    );
    ?????
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Thank you Michael

      I don't have a need for the API, hence it never crossed my mind to look.

      Doug
      There is a principle which is a bar against all information, which is proof against all arguments and which cannot fail to keep a man in everlasting ignorance - that principle is contempt prior to investigation.

      Herbert Spencer

      Comment


      • #4
        I'l be honest, I can't imagine what kind of application would want to, " delete[] a bunch of printers and add[] new ones. .... don't care [on add if ] the printer was found.."

        Except- maybe - some kind of printer-testing software?

        Pray enlighten me?
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Originally posted by Michael Mattias View Post
          I'l be honest, I can't imagine what kind of application would want to, " delete[] a bunch of printers and add[] new ones. .... don't care [on add if ] the printer was found.."

          Except- maybe - some kind of printer-testing software?

          Pray enlighten me?
          We installed two new domains and moved the old domains to member servers. One of the old domains served as a print server as well. Since we will eventually be taking the old print server off the network we moved all of our printers to one of the other member servers. As part of the move we need to delete the printers on the local machines that point to the old print server and add them back in pointing to the new print server. I do this through a down and dirty PB app that executes one time at the time the user logs in.
          There is a principle which is a bar against all information, which is proof against all arguments and which cannot fail to keep a man in everlasting ignorance - that principle is contempt prior to investigation.

          Herbert Spencer

          Comment

          Working...
          X