homedir problem

J

JeanMi_9

Hi all,

I have make this code to create homedir for my users

objuser.put "homedirectory","\\myserver\homedir\user"
objuser.put "homedrive",objuser.put "homedirectory","P:"
objuser.setinfo

How to make opposite?

I have try this but I have a syntax error

objuser.put "homedirectory",""
objuser.put "homedrive",""
objuser.setinfo

Thanks for your help
 
B

Brian Desmond [MVP]

Something like this will work:

Const ADS_PROPERTY_CLEAR = 1

objUser.PutEx ADS_PROPERTY_CLEAR, "homeDrive", Nothing

--
Thanks,
Brian Desmond
Windows Server MVP - Directory Services

www.briandesmond.com
 
J

JeanMi_9

Thanks Brian this is exactly that.

Brian Desmond said:
Something like this will work:

Const ADS_PROPERTY_CLEAR = 1

objUser.PutEx ADS_PROPERTY_CLEAR, "homeDrive", Nothing

--
Thanks,
Brian Desmond
Windows Server MVP - Directory Services

www.briandesmond.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top