printers RRS feed

  • Question

  • Hi,

    Below is my login script.  Can you help me write or add to this so when users are in location A they get the Admin & BusSrv printer which are a part of network and when they are in location B they get B's printer and the IP range in B location is

    I am very new to scripting so, please provide step by step instructions, and ask me any questions if the above is not clear.


    the script below is for A location.

    net use S: \\Epa-Data1\Shared
    net use u: \\epa-Data1\Users\%username%
    net time \\epa-dc1 /set /y

    start \\epa-data1\Admin
    start \\epa-data1\BusSrv


    Friday, October 26, 2012 3:43 PM


All replies

  • Hi - You need to implement location aware ness in Active Directory and use Group Policy to do this.

    If you want to do it with a batch file then you will need to parse the address.

    Look at the substring extraction methods orf the batch language SAET command: SET /?

    YOU only need to detect the 8th character and test for a 3 or a 4 to determin which subnet you are in.

    You will also need to parse the output of the IPCONFIG command. (IPCONFIG|findstr "IP Address")


    Friday, October 26, 2012 4:03 PM
  • Can you please elaborate on your comments?  Like how do I implement location awareness in AD or how do I parse address and also to detect the 8<sup>th</sup> char to test for 3 or 4 for subnet determination.



    Friday, October 26, 2012 4:14 PM
  • Friday, October 26, 2012 4:54 PM