Greg27
asked on
How to install printer, via a script, based on who the user is
II have 2 groups of users, one group that has network accounts that all begin with a number whereas the other group does not. I want to see if there is a simple script that checks the username and if it starts with a number, add PrinterA(Group 1 queue). If it does not begin with a number add PrinterA(Group 2 queue). So, this would be for the same printer, but I have 2 ports for that pritner, so I am creating a queue for 1 group and another queue for the other group.
If it is easier to check the login via AD that is fine too. If there is a way to check the username, determine if it is in the Group 1 security group or the Group 2 security group then add the printer accordingly, that would work too.
If it is easier to check the login via AD that is fine too. If there is a way to check the username, determine if it is in the Group 1 security group or the Group 2 security group then add the printer accordingly, that would work too.
ASKER
I just clicked on the link and it doesn't take me to a script, but to a general page with other links. Is there a different link that would show me the script?
ASKER
I am hoping I am just not blind, but I am not seeing where anyone responded to this question.
ASKER
Sorry pony10us, I just reread my quest and not sure I was clear in what I was saying. I looked at the link and it looks like the quest that user was asking would releate to my question, however I am not seeing where anyone responded to his question.
np Greg. I realized after I posted the link what I had done but I don't know how to remove a comment once posted. :(
In the meantime, I was trying to work something up.
In the meantime, I was trying to work something up.
Here is a site a little closer to what you have asked for:
http://www.petri.co.il/forums/showthread.php?t=6486
http://www.petri.co.il/forums/showthread.php?t=6486
I have stopped using scripts for adding printers and now I use Group Policy preferences.
http://blogs.technet.com/b/grouppolicy/archive/2009/06/24/gp-preferences-set-a-default-printer.aspx
Clients need to be Vista or above, or XP with the Group Policy Preference Client Side Extensions (http://www.microsoft.com/downloads/details.aspx?FamilyID=e60b5c8f-d7dc-4b27-a261-247ce3f6c4f8&displaylang=en)
http://blogs.technet.com/b/grouppolicy/archive/2009/06/24/gp-preferences-set-a-default-printer.aspx
Clients need to be Vista or above, or XP with the Group Policy Preference Client Side Extensions (http://www.microsoft.com/downloads/details.aspx?FamilyID=e60b5c8f-d7dc-4b27-a261-247ce3f6c4f8&displaylang=en)
ASKER
Due to the fact that I have different printers for different labs (we have multiple labs), i have to use a script. I only want to setup 1 printer based on which lab they are in. So, I just really need to fiugre out the best way to determine if a user is part of either security group of figure out if the first character of the username is a number or a letter. I hope this makes sense. currently, our login scripts are batch files.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the information!
http://lazynetworkadmin.com/content/view/7/6/