Auto install printer based upon location / Dept
I've got a print server and about 7 different depts with various printers.
I'd like when a user logs into a PC to auto map the correct printer by dept. My computers are named by the department they are in. For example a computer in accounting could be ACCT01, ACCT02 and so on.
My idea was using the login script.
IF %computername%==ACCT (install accounting printer)
IF %computername%==HR (install HR printer)
The problem is IF command compares the entire string. So ACCT01 returns a false value. I need to able to pull just the ACCT from the %computername% variable.
I'm open to anything!