Announcement

Collapse
No announcement yet.

simple add printer .bat script

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

  • simple add printer .bat script

    Hi,

    I need a script that will add a network printer to a users profile at login.

    I can get all my mapped network drives working by using

    net use T: \\server\sharename

    Is there a way i can add network printers with similar code i.e.

    net printer \\server\printername (does not work though)

    Cheers

  • #2
    Re: simple add printer .bat script

    does this help you out?
    http://www.google.nl/search?hl=nl&q=...er+batch&meta=
    Marcel
    Technical Consultant
    Netherlands
    http://www.phetios.com
    http://blog.nessus.nl

    MCITP(EA, SA), MCSA/E 2003:Security, CCNA, SNAF, DCUCI, CCSA/E/E+ (R60), VCP4/5, NCDA, NCIE - SAN, NCIE - BR, EMCPE
    "No matter how secure, there is always the human factor."

    "Enjoy life today, tomorrow may never come."
    "If you're going through hell, keep going. ~Winston Churchill"

    Comment


    • #3
      Re: simple add printer .bat script

      try it with kix

      ?"================================================ =================="
      ?" installing Printers! =="
      ?"================================================ =================="

      IF @WKSTA="nameofcomputer" OR @WKSTA="nameofcomputer1"
      IF addprinterconnection("\\servername\printershare")= 0
      ? "Printer is installed on your computer"
      ENDIF
      ENDIF

      Download kix at kixscripts.com
      unpack it in the netlogon directory
      edit the kixstart.kix or make 1 yourself
      open manage users and computers
      get properties of the user
      go to tab profile
      put in logonscript : kix32

      login the workstation you have mentiont and kix will attach the printer
      Last edited by afina; 31st January 2006, 06:50.

      Comment


      • #4
        Re: simple add printer .bat script

        you could create a simple batch file i.e printer.bat

        the batch file would look like...

        START \\SERVER1\PRINTER1
        START \\SERVER1\PRINTER2

        --------------------------------------------------

        Then you could copy this batch file to the "C:\Documents and Settings\All Users\Start Menu\Programs\Startup" folder and it will run everytime a user logs on.

        Or you could copy this same batch file to a share on a server and then add a line in the logon scripts to run it.

        ie example logon script

        net use i: \\server1\apps
        \\server1\share1\printer.bat

        Comment


        • #5
          Re: simple add printer .bat script

          hi there

          we have used the con2prt.exe command from the Windows resource kit. We copy a batch file and the Exe to the client PC.

          The command line we use is.. con2prt.exe /cd \\server\printername

          the c switch connects the printer and the d switch makes it default. We have used this on terminals where multiple users login and can use multiple printers e.g. a label printer and a report printer

          FJ

          Comment


          • #6
            Re: simple add printer .bat script

            Use VB

            http://forums.petri.com/showthread.php?t=6486

            Just don't use the Ifmember sections.

            If you already have a batch file as your login script just add the line

            START \\DC\netlogon\AddPrinter.vbs

            topper
            * Shamelessly mentioning "Don't forget to add reputation!"

            Comment


            • #7
              Re: simple add printer .bat script

              Hi.

              Anyone know how to do something similar with a non-shared printer? I have a Lanier LD120, which connects directly to the LAN. And about 100 computers on which I don't want to manually install printers. Any ideas?

              Lanier doesn't make an .msi package. Building one myself hasn't worked out.

              Thanks!
              buckets

              Comment


              • #8
                Re: simple add printer .bat script

                Originally posted by gnarbuckets
                Hi.

                Anyone know how to do something similar with a non-shared printer? I have a Lanier LD120, which connects directly to the LAN. And about 100 computers on which I don't want to manually install printers. Any ideas?

                Lanier doesn't make an .msi package. Building one myself hasn't worked out.

                Thanks!
                buckets
                I'm not sure how the driver for this thing is structured but if it includes an INF you might be able to extract the driver+INF from the .msi to a share then use a batch file pointing to the share as the INF location.

                Check this link out to for instructions on how-to install the driver using cmd prompt from an inf file.
                http://techsupt.winbatch.com/ts/T000001031F17.html
                Andrew

                ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

                Comment

                Working...
                X