First, make sure that you're logged on to the computer using an account that has administrative privileges. Next, make sure "Use simple file sharing" is unchecked, under "My Computer" | Tools | Folder Options | "View" tab | Advanced settings.
Right-click the folder you want to take ownership of, and then click Properties. Click the Security tab, and then click OK on the Security message (if one appears). Click Advanced, and then click the Owner tab. In the Name list, click your user name, Administrator if you're logged in as Administrator, or click the Administrators group. If you want to take ownership of the contents of that folder, click to select the Replace owner on subcontainers and objects check box...and click OK. The following message will appear:
"You do not have permission to read the contents of directory. Do you want to replace the directory permissions with permissions granting you Full Control?" All permissions will be replaced if you press Yes. Click Yes, click OK...and then reapply the permissions and security settings that you want for the folder and its contents.
You can reset all your file permissions back to their defaults, if need be, by adding two MMC snap-in's. You'll need to add Security Configuration and Analysis and Security Templates to a new MMC console, by clicking Start | Run | then type mmc /a | click OK. On the File menu, click Add/Remove Snap-in, and then under Add/Remove Snap-in, click Add | Click Security Configuration and Analysis and click Add | Click Security Templates and click Add | Click Close, then click OK.
To reapply default security settings...In the console tree, right-click Security Configuration and Analysis and in Import Template, click Setup Security and click Open. In the console tree, right-click Security Configuration and Analysis, and then click Configure Computer Now. To use the default log, in Error log file path, click OK. To specify a different log, in Error log file path, type a valid path and file name. When configuration is done, right-click Security Configuration and Analysis, and then click View Log File.
If you want to access this tool from the Administrative Tools menu, save the new console as secconfig.msc and create a shortcut to the .msc file that you save. Most .msc files are in \%windir%\system32, so you can save this new console there, if you like. You could also add this tool as a snap-in to another console such as Computer Management.