I hope this is the right place for this question and if not, please kindly direct a noob.

I have super limited experience with KIX but here goes.

I have a login script running in a 2008 domain on mostly Win 7 64 clients.

I have created a security group in AD that maps a drive for a user. It is currently mapping using the following:

 Code:
; REM **********************************************************************
; REM **
; REM **  Enterprise My_Drive Group Mapping for \\servername\My_Drive\ to v:\
; REM **  Based on SEC-My_Drive group membership ----- @Comment is for AD Description
; REM **
; REM ***********************************************************************

IF INGROUP ("My_Drive")
  $ErrorNumber = 0
    
    USE V: /DELETE /PERSISTENT
    USE V: "\\@Comment\My_Drive" /PERSISTENT
    IF @ERROR
      $ErrorNumber = $ErrorNumber + @ERROR
      $Dummy = WRITELINE (10, "Could not map My Drive project drive V: \\@Comment\My_Drive" + CHR(13) + CHR(10))
    ELSE
      ? "        Drive V:  \\@Comment\My_Drive"
      $Dummy = WRITELINE (10, "Mapped My_Drive drive V: \\@Comment\My_Drive" + CHR(13) + CHR(10))
    ENDIF


What I want to accomplish is to map the drive using the user's current location assuming the share has been setup on that server.

I've been attempting to use the @Logon variable for testing and getting nowhere fast.

Is there a simple way to do this, or will I have to do something like mapping by subnet?

Many thanks in advance for any advice.



Edited by Glenn Barnas (2013-03-12 08:12 PM)
Edit Reason: Added code tags