+ Post New Thread
Results 1 to 5 of 5
Windows Thread, Problem with %HOMEPATH% and %HOMESHARE% variables in Technical; For every logon ive recorded the following environment variables: %USERNAME% %HOMEDRIVE% %HOMEPATH% %HOMESHARE% %LOGONSERVER% The problem is: Those who have ...
  1. #1

    Join Date
    Sep 2005
    Posts
    143
    Thank Post
    0
    Thanked 3 Times in 3 Posts
    Rep Power
    19

    Problem with %HOMEPATH% and %HOMESHARE% variables

    For every logon ive recorded the following environment variables:
    %USERNAME% %HOMEDRIVE% %HOMEPATH% %HOMESHARE% %LOGONSERVER%

    The problem is:
    Those who have %HOMEPATH% = "\" and %HOMESHARE% = "\\server\share\path\here\to\username" have their homefolder mapped to H: properly.

    Those who have %HOMEPATH% = "\yearintake\username" and %HOMESHARE% = "\\server\share" have their H: mapped to \\server\share.

    MyDocuments was set to H:, but a workaround currently in place is to redirect mydocs to the full home folder - which works.

    However, some applications cannot use UNC paths for storing documents so it needs to use the H: drive.

    This problem (not getting full path mapped to h:) happens very randomly and only applies to students.
    Staff are all on \\hhfs03\users\staff\username and students are distributed throughout hhfs01, hhfs02 & hhfs03.
    Staff use roaming profiles and students use a mandatory profile.
    All servers are Server 2003 SP1 and all workstations are XP Pro SP1.

    Ive applied a GP change to both students and staff:
    User Configuration->Administrative Templates->System->User Profiles-> Connect home directory to the root of the share-> DISABLED

    Ive attached 2 files to demonstrate the problem, 1 screenshot of excel for a quick butchers and the 2nd is a csv(.txt) file for you to manipulate if necessary.
    Attached Images Attached Images

  2. #2
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    35

    Re: Problem with %HOMEPATH% and %HOMESHARE% variables

    Any reason why you can't make all your users use the same scheme? Why the difference?

    I use the following user account settings
    - map H: to \\server\share\%username%

    GP My Docs redirect to %HOMESHARE%%HOMEPATH%

    If you have settings that work, use a script to modify users with non-working settings to correct them.

  3. #3
    tarquel's Avatar
    Join Date
    Jun 2005
    Location
    Powys, Mid-Wales, UK
    Posts
    1,740
    Thank Post
    13
    Thanked 45 Times in 35 Posts
    Rep Power
    30

    Re: Problem with %HOMEPATH% and %HOMESHARE% variables

    Hi frazer

    My usermaker script is similar but i only use a princible of

    scriptname year form Firstname Second etc...

    The script does the rest.

    Any duplicate firstnames are noted and manually processed afterwards using the script i.e.

    Firstname with the first char of the secondname.

    The script of course detects if the user exists or otherwise, it would start changing the existing user, dir and hidden share, etc...

    I've got more tweaking to do but it works real well.

    The only snag here is sometimes they input into sims the first names the wrong way around but its no real problem really. The users dont mind (and why should they - its only a logon name hehe)

    Regards
    Nath

  4. #4

    Join Date
    Sep 2005
    Posts
    143
    Thank Post
    0
    Thanked 3 Times in 3 Posts
    Rep Power
    19

    Re: Problem with %HOMEPATH% and %HOMESHARE% variables

    @ajbritton:
    It gets a little messy with 2000+ user accounts crammed into one folder. A little organisation goes a long way :P Besides win2k/2k3 is supposed to support sub folders in shares and for most logins, it does. MyDocuments redirection works fine from GP, its the homedrive that is not being mapped properly on some logins.
    Even with just \\server\users\%username% we found H: sometimes mapped to \\server\users.

    @tarquel:
    It was the output of some variables (open a dos box and type 'set') after each user logs in, nothing to do with user creation

    Edit: it appears this, http://support.microsoft.com/?kbid=236813 describes my problem. Although its 2K3 SP1 and XP Pro SP1a with no DFS AND is not consistant

  5. #5

    Join Date
    Sep 2005
    Posts
    143
    Thank Post
    0
    Thanked 3 Times in 3 Posts
    Rep Power
    19

    Re: Problem with %HOMEPATH% and %HOMESHARE% variables

    Ive fixed it!
    \o/
    GP Computer _OR_ User policy (ive done it on the pupils user policy since staff was already working fine):
    Administrative Templates -> System -> Scripts -> Run Logon Scripts Syncronously -> ENABLED

    This must be set for the staff somewhere since its not affecting them, be damned it I can find it though :/



SHARE:
+ Post New Thread

Similar Threads

  1. Environment variables or other method
    By HodgeHi in forum Scripts
    Replies: 3
    Last Post: 21st June 2006, 10:05 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •