Announcement

Collapse
No announcement yet.

Scripting help needed

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

  • Scripting help needed

    I work at a community college and was asked to script something to change every user's default printer in a single room from the color printer to black and white. We just got PaperCut, so it makes it a little more confusing, since I'm not sure if the virtual print queue affects it or not. The printer we have in said room (an open lab) only has a B&W printer, so doesn't recognize anything from the color queue.

    I've never scripted in my life before, but I hobbled one together yesterday, and it seemed to work a little bit, but then stopped working. I've used it as a .vb and a .bat, to no avail.

    This is the script:
    Cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\Prnmngr.vbs -t -p "B&W Queue on print"

    Would someone be willing to TEACH me how to make the script or a new script work? I'd rather not be told what to do; learning would be much nicer, so I can alter it if needed, etc.

    Thanks,
    Ariel

  • #2
    Re: Scripting help needed

    Hi Ariel
    It is good that you want to learn -- so many here just want a solution on a plate.
    You are trying to run a built in script provided by Microsoft and appear to be using it with the correct syntax (based on the examples for the script)
    When you run it, do you get any sort of error message, if so, what?
    The script requires the printer already exists on the client (see the help http://technet.microsoft.com/en-us/l...(v=ws.10).aspx) so you could verify that first
    Also, what server OS is the shared printer on, and what OS is on your domain controllers, as there may be easier ways than using a script
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

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

    Comment


    • #3
      Re: Scripting help needed

      I don't receive an error message; it just doesn't do what I want it to. When I run it in a .vb file, Visual Basic opens up and shows me what I wrote, and the same thing happens when I wrote it in a .bat file except it opened in the cmd box.

      The printers are already established and exist on the computers, they float on our office fileshare.

      We use a 2008 Server for the printers, I believe and our domain is an AD.

      Comment


      • #4
        Re: Scripting help needed

        Thanks
        Can you post a screenshot of the exact output when you run the script in a cmd prompt -- open one and paste in the exact command you posted originally please

        What OS is on the client computers?
        Also are your AD domain controllers Server 2008?
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

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

        Comment


        • #5
          Re: Scripting help needed

          I have some sad news to report. I figured out how to fix it on my own. You see, I had been given an old script that didn't work anymore. Since I didn't know how to use it or anything, I wrote my own in hopes of being about to know and/or learn what I was doing. Because of that, when I looked back at the old one I thought I had figured out the problem. Turns out the problem was a little lamer than that, though.

          But the old script works again! Huzzah! It just wanted the printer's port name which had been changed thanks to our new printing virtual server PaperCut.

          Thank you so much for helping me. It was really nice that you were going to teach me what to do!

          -Ariel

          Comment

          Working...
          X