How to take full control on a file, registry key, folder or a drive in windows vista

Written by admin on March 24, 2009 – 10:04 am

           The security restrictions  involved in Windows Vista will be really frustrating to the standard user or even for administrator. For security reasons some operations are restricted for standard user and admin also like deleting some files are restricted or modifying the file is denied.

            So taking ownership on the file/folder/drive/registry key is a simple process but you have to take a note on one thing “Even administrator having full rights cannot modify or delete the system files in windows vista”. If you want to know why you can’t do that to system files in vista here is a small explanation; Vista System files are owned by service named TrustedInstaller and windows file protection system will keep these files safe from being overwritten and if you ever try you will get “Access Denied” error.

             Follow the below simple steps and you will take the ownership on a file/folder :

  • Run CMD.exe  ( start -> Run -> type CMD  <-’  )
  • Point the mouse pointer on the top of the Command prompt window and make a right click on that and select
    “RUN AS ADMINISTRATOR”.
  • UAC prompt will occur, click continue 
  • Now type “takeown /f full_path_of_file”                                                                                                                                                      Example:  takeown /f c:usersexample.txt
  • After entering the command you will get a message displayed in command prompt saying that the message is completed successfully.
  • Now you are the owner of the file.
  • You have to execute another command “icacls (full_path_of_the_file) /grant (your user-name):F”                                                                                           Example:  icacls  c:usersexample.txt /grant ram:F                 
  • Again you will be displayed with the message command completed successfully. 

You have now the full ownership on the file and you should be able to modify or delete the file.

Posted under Vista | No Comments »

Leave a Comment

You must be logged in to post a comment.