Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! Vbscript not creating Homedirectory

Status
Not open for further replies.

atdawgie

Technical User
Sep 29, 2001
60
US
Using Vbscript I'm trying to create a homefolder on a network drive under windows 2000. I set the variables HomeDrive and HomeDirectory where username is a string
usr.Put "homedirectory", "\\servername\sharename\directory\" & username
usr.Put "homedrive","M:"
usr.Setinfo

The directory is never created after I run the script, but if I create the user manually inputing the directory info, the directory is created?

Thanks,
Aaron
 
Use Wscript.Network object to create a share (map network drive) for a network path to an drive letter and then use FileSystemObject to create a folder to that driveand then remove share... ________
George, M
 
atdawgie,
Create the user first by using "usr.setinfo" and then add the directory. It's sort of like your trying to add a directory to a user who doesn't really exist yet, that's why you need to add the user first.



---------
usr.Setinfo
usr.Put "homedirectory", "\\servername\sharename\directory\" & username
usr.Put "homedrive","M:"
usr.Setinfo


Cheers,
fengshui1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top