Results 1 to 6 of 6

Thread: Set home users home folder in VBS or GPO

  1. #1
    Join Date
    Nov 2005
    Posts
    42

    Set home users home folder in VBS or GPO

    As my subject line says itself, I am searching a way to set my entire users Home Folder in either in VBS or in GPO. The way I knew was using the he profiles tab in Active Directory 2003 but there are many articles on web that says we don’t need to do the same. But the problem is there is no other way mentioned using which I can do what I want to do.

    Can anyone here knows about any alternate way for the same? If yes, please let me know soon.

    Many Thanks.

  2. #2
    Join Date
    Sep 2004
    Posts
    42

    Re: Set home users home folder in VBS or GPO

    You dint mentioned which server you are using. I guess its Windows Server 2003, right? You will need to wait until you have Windows Server 2008 in order to use built-in ability to map drives via GPO's because this functionality is included as part of Group Policy Preferences in Server 2008.

    Alternatively you can also create a user drive mappings via logon scripts - which you can configure from GPO. See if it helps.

  3. #3
    Join Date
    Nov 2005
    Posts
    42

    Re: Set home users home folder in VBS or GPO

    Thank you very much for the help and for a great news that Server 2008 comes with this builtin But still the problem am facing is though i'm able to map my users "home folder" in a vbs script without any problem i'm failing while setting up the HomeDir and HomePath so that when a user saves a file it goes straight to the users home folder. Somebody told me that i can use dos command set and see them but i wanted to know how can i set them in VB if that is what I should be doing? Please help.

  4. #4
    Join Date
    Oct 2005
    Posts
    144

    Re: Set home users home folder in VBS or GPO

    This will probably help you out.
    On Error Resume Next

    Set objUser = GetObject("LDAP://cn=Ken Myer, ou=Finance, dc=fabrikam, dc=com")

    If IsEmpty(objUser.homeDirectory) or IsNull(objUser.homeDirectory) Then
    strUser = objUser.sAMAccountName
    strHomeDirectory = "\\atl-dc-01\users\" & strUser
    objUser.homeDirectory = strHomeDirectory
    objUser.homeDrive = "Z:"
    objUser.SetInfo
    End If
    For more help, check this Microsoft Article: How Can I Assign a New Home Drive to a User Who Doesn’t Have One?

  5. #5
    Join Date
    Nov 2005
    Posts
    42

    Re: Set home users home folder in VBS or GPO

    Help appreciated Milton but I don’t think it is going to help me because it appears to update the AD objects for the normal user which doesn't have access to? Anyways, can you just provide me a very similar method using which I can update it on just users local environment?

  6. #6
    Join Date
    Sep 2004
    Posts
    149

    Re: Set home users home folder in VBS or GPO

    Hello Umedd, Just try incorporating the following into your login script:

    Set oShell = CreateObject("WScript.Shell")
    Set oEnvVol = oShell.Environment("Volatile")
    Set oEnvProc = oShell.Environment("Process")

    Set oNet = CreateObject("Wscript.Network")

    oEnvVol("HomePath") = "\"
    oEnvVol("HomeDrive") = "H:"
    oEnvVol("HomeShare") = "\\YourServer\Home\" & oEnvProc("UserName")

    oNet.MapNetworkDrive oEnvVol("HomeDrive"), oEnvVol("HomeShare")

Similar Threads

  1. Replies: 3
    Last Post: 16-07-2011, 03:03 AM
  2. Home Directory for the users using useradd
    By Rhadamanthys in forum Operating Systems
    Replies: 6
    Last Post: 12-11-2010, 07:45 AM
  3. Home folder in MAC
    By Aloke in forum Windows Software
    Replies: 5
    Last Post: 31-12-2009, 02:26 AM
  4. Replies: 1
    Last Post: 31-10-2008, 08:49 PM
  5. Replies: 2
    Last Post: 01-09-2008, 12:55 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,298,961.52520 seconds with 17 queries