none
Script to map default printer based on user input RRS feed

  • Question

  • Hello everyone,

    Complete scripting noob here but I managed to cludge together a vb script (from various sources) that will remove all current printers and then add printers based on group membership.  It can also add a default printer and if they have a local printer make that default.  All that works just fine, my problem is that we have very large floors with many printer clusters.  Group membership for printers is by floor and I do not have the option to further define this (Also GPO is not an option as getting our network group to deploy anything takes years so we need to go this route).

    What I would need is something graphical (like an HTA) that when run it prompts the user to input which floor they are on, then it asks them which of the print clusters (on the floor they specified) is closest to them.  It would then install all the printers on the floor and make the default printer one from the print cluster they indicated (unless they have a local printer).  I hope this make sense. 

    I think I have most of the pieces laid out but I don't know how to get the user prompts/GUI and then perform the correct mappings.  Thank you in advanced!

    Wednesday, March 5, 2014 4:27 PM

Answers

  • Hi,

    Sorry, but this isn't a forum where you can tell some requirements and have someone write the code for you.

    I know you said GPO isn't an option, but Group Policy Preferences really is the best answer since you're not familiar with scripting.

    If you are insistent that GPO is impossible, then I'd recommend hiring a qualified consultant who can gather your requirements and design a script to your specifications (and provide ongoing support for it).

    Bill

    Wednesday, March 5, 2014 4:36 PM
    Moderator

All replies

  • Hi,

    Sorry, but this isn't a forum where you can tell some requirements and have someone write the code for you.

    I know you said GPO isn't an option, but Group Policy Preferences really is the best answer since you're not familiar with scripting.

    If you are insistent that GPO is impossible, then I'd recommend hiring a qualified consultant who can gather your requirements and design a script to your specifications (and provide ongoing support for it).

    Bill

    Wednesday, March 5, 2014 4:36 PM
    Moderator
  • I agree with Bill. Using the correct method will be best.  You network people will be more than happy to tell you what is set up and how to use it.  You just need to ask your manager to get you in contact with them for a little parley.

    If you are really insisting on a script then look in the repository.  There are dozens of scripts that you can use and modify.

    You should try to see this as a challenge to bring modern technology to your company.  Approaching this kind of thing as a global IT challenge will usually get the attention of IT and they will usually take it seriously.  You will likely learn many things about the IT resources your company has.


    ¯\_(ツ)_/¯

    Wednesday, March 5, 2014 4:43 PM
  • Hi,

    Bill is definitely right, GPP should really be used for this.

    If you're determined to see this through though, here's some HTA resources you can use:

    http://technet.microsoft.com/en-us/scriptcenter/dd742317

    Just be warned, HTAs aren't the easiest thing in the world to wrap your brain around.


    Don't retire TechNet! - (Don't give up yet - 12,700+ strong and growing)

    Wednesday, March 5, 2014 4:43 PM
  • I agree with Bill. Using the correct method will be best.  You network people will be more than happy to tell you what is set up and how to use it.  You just need to ask your manager to get you in contact with them for a little parley.

    If you are really insisting on a script then look in the repository.  There are dozens of scripts that you can use and modify.

    You should try to see this as a challenge to bring modern technology to your company.  Approaching this kind of thing as a global IT challenge will usually get the attention of IT and they will usually take it seriously.  You will likely learn many things about the IT resources your company has.


    ¯\_(ツ)_/¯


    I'm sorry if I wasn't clear but I'm not asking anyone to write the script for me, as I said I have most of the parts working.  My issue is getting the user input and getting the script to take the action I need it to (I can map the printers based on AD group membership I really just need to prompt the user to select which one they want as default).  My thoughts were to wrap a GUI around it but it's not needed.

    I agree that GPO is the way to go but in State Government it takes an act of Congress to get anything done in the mean time I'm trying to get things done with the means available to me.


    • Edited by Nnyan Friday, March 7, 2014 4:32 PM
    Friday, March 7, 2014 4:31 PM
  • Unfortunately your thoughts are more than a few lines of example code.

    Look in the Gallery as there are plenty of scripts in there for managing printers. Have you looked yet?


    ¯\_(ツ)_/¯

    Friday, March 7, 2014 4:41 PM
  • Don't use State Gov as a fallback. I have worked with and for government agencies for year.  They usually want to do things correctly.   It is your job as a professional to tell them the correct way.

    As far a s scripts go there are many in the Gallery.  Have you looked?


    ¯\_(ツ)_/¯

    Friday, March 7, 2014 4:43 PM