If your environment dictates a different profile for roaming users, based upon the location they log on from, as in multiple student labs, try the following approach:


- Each client computer has a fixed location.

- The client computer contains the proper initial default profile for new users.

Server configuration changes

- Create folders for the roaming profiles on the server using a path similar to:

      \\<Server Name>\<Location Name>\<UserName>

    When the user logs on, they will receive a location environment variable based upon the client PC.

- Share each location folder as hidden share <Location Name$>.

- Set the user's Profile Path to \\<Server Name>\%location%$\%UserName%

NOTE: You must create a folder for each possible %location% that the user can use.

NOTE: You can use the net user <User Name> /profilepath:\\<Server Name>\^%location^%$\^%UserName^% /domain command. The ^ prevents the environment variable from being immediately interpreted.

NOTE: Set NTFS permissions according to your normal security policy.

Client computer configuration changes

- Use the freeware REG to set the location system environent variable by issuing the following command from your computer:

      <path>\REG -Set "\\ClientComputerName\Machine\System\currentControlSet\Control\Session Manager\Environment\location"=<Location Name>

- Shutdown and restart the client computer by using Shutdown.exe from your computer.

NOTE: You can create a batch file and run the commands when no one is logged on.

This procedure works because the %location% and %UserName% environment variables in the Profile Path are NOT interpreted until the user logs on.

When a new user logs on, they receive their initial profile from the local PC. When they log off, their profile is written to the server at \\<Server Name>\<Location Name>\<UserName>.

When an existing user logs on, the System environment variable %location% and the %userName% variable are expaned, causing the user profile to be download from the server.