drive.
You cannot seize ownership with CACLS but you can grant yourself or a
user group full control on the files:
cacls D:\ /t /e /g Administrators:f
will grant all members of the Administrators groups full control on all
the files on drive D. Use the /c switch to continue on errors:
cacls D:\ /t /e /c /g "Your User Name":f
You can set file ownership and permissions from the command prompt with
the SubInACL utility:
subinacl /subdirectories d:\ /grant=administrators=f
/setowner=administrators
The SubInACL utility is available for download on the Microsoft site.
Otherwise boot to safe mode and follow the instructions in the link
provided by the other posters.
Managing File and Folder Permissions Through the Command Line Utility
http://support.microsoft.com/kb/288292/en-us
Undocumented CACLS: Group Permissions Capabilities
http://support.microsoft.com/kb/162786/en-us
John