|
-
Mar 4th, 2005, 08:58 AM
#1
Thread Starter
Junior Member
ADSI Homedrive
Ok I'm using the following code to Add a home drive to my user in AD. I can see the changes in ADUC however when the user logs it connects the home drive as:
\\server01\home$\
instead of
\\server01\home$\newuser
DE.Properties("homeDrive").Add("h:")
DE.Properties("homeDirectory").Add("\\server01\home$\%username%")
DE.CommitChanges()
However if I just open ADUC go to the profile tab and hit apply next log on it works. I'm I missing something in my code to create the Directory itself?
-
Mar 4th, 2005, 09:39 AM
#2
Hyperactive Member
Re: ADSI Homedrive
Hi RedCamel,
AD will not create the directory for you automatically, you need to create it yourself through your code.
"I'm Brian and so is my Wife"
-
Mar 4th, 2005, 10:08 AM
#3
Thread Starter
Junior Member
Re: ADSI Homedrive
Do you have any sample code?
-
Mar 6th, 2005, 06:58 AM
#4
Re: ADSI Homedrive
Creating a directory is easy, use the IO class and you can do it in one line of code.
VB Code:
IO.Directory.CreateDirectory([i]DirectoryToMake[/i])
I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|