We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


Assigning printers based on location and user after logging in through a VPN connection.

stevestark asked
Medium Priority
Last Modified: 2012-05-04
Clients:  Windows 2000/XP
Server:  Windows 2003 AD

Here is the process:  The user boots up the PC/Laptop.  They are presented with the CTRL-ALT-DEL screen.  When the user hits CTRL-ALT-DEL they are presented with the Cisco VPN 4.0+ version client login.  Once logged into the VPN, they can then log in to the OS where login scripts can then run.

Setup after logging in:  If it is the first time a user logs in to that PC, they do not have printers installed.  We have instructed everyone on how to simply add the printers, but they normally forget and then complain about it.

Goal:  We would like to use a login script to set up the printers automatically based on the user and the location of the user.  We have users that float between sites and need sometimes 3 printers installed at each site.  I am using the following script to automatically install the printers, but this installs the exact printers no matter which site they are located at:

REM This script adds a printer without the need of Add a Printer Wizard
REM It then sets the first printer added as the default printer
rundll32 printui.dll,PrintUIEntry /in /n \\server\printer
rundll32 printui.dll,PrintUIEntry /y /n "\\server\printer"

This script would be perfect if it weren't for the floating users.  

I would normally do this at the system level through group policy, but they do not receive the group policy when booting up because they must first connect to the Cisco VPN.  This limits my ability to deploy this via a script with the exception of a user login script.  

Any help would be appreciated.  Big points!
Watch Question

Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Most Valuable Expert 2019
Most Valuable Expert 2018
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.