Xcacls and taking ownership of user profile folders

C

Chris

Hi all,

I'm trying to automate the deletion of roaming user profiles stored on a
file server using a native Win2K script. My problem is with the ownership of
the user profile folders on the server. Xcacls doesn't seem to do the job of
taking ownership of the folder so the script can then give administrator
full permissions & delete it. So far I have:

XCACLS %PRFLLOC% /G %EXECUSER%:O /Y

to take ownership of the folder (where %PRFLLOC% is the location of the
profile folder & %EXECUSER% is the administrative user account that will
take ownership & delete the folder), followed by:

XCACLS %PRFLLOC% /T /G %EXECUSER%:F /Y

I get an access is denied message after the first command. What am I
missing/doing wrong?

Thanks.
 
W

Wensi Peng

Use Takeown.exe from win2k/NT Resource Kit. It will assign local admins full
access. I did it for production issue.

Wensi
 

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