Script to Take Ownership and Grant Full Control

Discussion in 'Windows Vista' started by admin, May 24, 2007.

  1. lanith

    lanith MDL Novice

    Sep 30, 2008
    5
    0
    0
    Well, I DL'd it to desktop. Then I put the file on the desktop and double-clicked. Saw the command prompt appear for a split second then disappear. Did I do anything? (Has anything been added to the registry)?

    Thanks so much.

    -Lanith.
     
  2. bruno13

    bruno13 MDL Novice

    Nov 4, 2007
    2
    0
    0
    i am running RCrawler 4.5.04 in windows vista bussiness edition.
    It gives an error "failed to find the regedit tool" while clicking the
    hyperlink.
    pls tell how to resolve this.
     
  3. wisitor

    wisitor MDL Novice

    Nov 14, 2008
    1
    0
    0
    thanks, this script saved me from alot of problems.
     
  4. ¦•••SHERIFA•••¦

    Dec 6, 2008
    2
    0
    0
    Hello, I've take the ownership on System32 folder ( and all folders, subfolders & files ). How to return this ?
     
  5. admin

    admin Administrator
    Staff Member

    Apr 24, 2007
    236
    116
    10
    Try to use sfc?
     
  6. chr15_mo55

    chr15_mo55 MDL Novice

    Jan 15, 2009
    1
    0
    0
    Thanks Alot

    Playing around with windows 7 and the homegroups when all my music needed permissions! have so much did not want to do them 1 by 1 thanks alot:) will keep the reg safe
     
  7. mehappy

    mehappy MDL Novice

    Jan 20, 2009
    1
    0
    0
    Hi,
    I was looking for this script for a week now! I've read about "Takecontrolof.cmd" and decided to use this script to change owner of C:\Windows\System32\Mapisvc.inf on a Vista client. Takecontrolof.cmd is stored in the same folder as Mapisvc.inf. Unfortunately it doesn't work for me! :(

    This is what I get when I run this script:

    "C:\Windows\System32>takeown /f c:\windows\system32\mapisvc.inf /r /d y
    ERROR: The specified path is not a valid directory path.

    C:\Windows\System32>icacls c:\windows\system32\mapisvc.inf /grant administrators
    :F /t
    processed file: c:\windows\system32\mapisvc.inf
    The system cannot find the file specified.
    Successfully processed 1 files; Failed processing 1 files"


    I'll be grateful if someone can explain to me what I'm doing wrong here, please?

    Thanks

    Regards
    MeHappy
     
  8. Singapore_Air

    Singapore_Air MDL Novice

    Jan 25, 2009
    1
    0
    0
    Thanks a lot for this tool !

    I just wasted half an hour trying to take ownership of the WinSxS folder but the script did it in about 2 minutes !
     
  9. Ontittech

    Ontittech MDL Novice

    Feb 21, 2009
    1
    0
    0
    I have a file that TakeControlOf does not work on still.

    It is a VOB that was created when I dumped my Video Camera to my PC. now I am trying to delete it, and it says i need permission.

    I have tried deleting it using the Local Admin account (The So Called "Hidden Admin" without Luck, and TakeControlOf Wont Delete it either. I am pulling my hair out as it is a 6.2GB file which is taking up a good share of my Download Partition. I am almost ready to move everything else off that partition and blow it away.

    Any other suggestions?
     
  10. akakrill

    akakrill MDL Novice

    Mar 8, 2009
    1
    0
    0
    Wwhhhhoooohhhhhooooo!


    THAT REG KEY SAVED MY LIFE! Thank you, We should mass distribute that! FU Windows!
     
  11. xpert

    xpert MDL Novice

    Mar 30, 2009
    1
    0
    0
    The Take Ownership reg file works like a charm!!!

    Thanks a lot!!!!
     
  12. Zephans

    Zephans MDL Novice

    Apr 3, 2009
    1
    0
    0
    This post saved me!

    Wow... I spent 2 hours poking around trying to figure out how to take ownership of 5109 files I accidentally copied from my Vista System folder to my external backup drive. I was NOT going to hand-update each one... and even then I couldn't get Properties->Security options to work since only TrustedInstaller has full rights. (Even Administrator account does not have delete or other rights beyond read/write!)

    FYI: If the TakeControlOf.cmd script disappears it is pretty easy to just use the related commands in desired directory "takeown /f . /r /d y" and "icacls . /grant administrators:F /t".

    Here's more detailed steps (for Vista) that don't require downloading anything:
    1. Click Start, then type cmd.exe
    2. Wait a second for cmd.exe to appear in top of Start menu, then right click cmd.exe menu and select "Run as administrator".
    3. In cmd.exe change to directory you wish to take ownership of
    CD c:\directoryname\etc.
    4. Enter following commands in order (replacing %1 with desired path/filename or "." for current directory):
    takeown /f %1 /r /d y
    icacls %1 /grant administrators:F /t
     
  13. ankdoz

    ankdoz MDL Novice

    Apr 10, 2009
    1
    0
    0
    that was an awesome way of deleting stuff..thanks for the stuff...
    Oz
     
  14. EamonKunze

    EamonKunze MDL Novice

    Apr 15, 2009
    2
    0
    0
    1st and 2nd reg keys doesn't always work.
    the cmd solution is much better.
     
  15. imemine

    imemine MDL Novice

    Apr 28, 2009
    1
    0
    0
    TakeOwnership prog

    when I right click this on a folder I get an error that the operating system has shut down and gives me the look on internet or close prog. I'm wasting half my day here because I can't access any of the document files I created on my laptop. I'm the only administrator/user. The program didn't work for me.
     
  16. RobMongoose

    RobMongoose MDL Novice

    Nov 3, 2008
    1
    0
    0
    Excellent. Thanks for providing the script that I was too lazy to write myself....

    One of my hard drives had decided that I had no access rights after a Vista reinstall. This sorted it straight away.

    Thanks again!
     
  17. Angelz_curse

    Angelz_curse MDL Novice

    Aug 29, 2009
    1
    1
    0
    This is an awsome little tool

    I got into this situation when I had to back up my files from one computer and transfered them to another computer, so obviously the premissions were for the previous computers domain and users.

    Without this tool, I would have to laboriously go through every file and folder and set the object to belong to me, then I would then need to enter the file/folder and manualy add myself on the ACL then from there give myself the permissions.

    this tool simplifies this if your computer wont allow you to use the ICACLS command.

    TO USE:

    • Download the link from this forum, put the file in a location you can access it from a command line, i.e F:backUP/TakeControlOF.cmd (my external hard drive, inside my backup folder)
    • Then open the cmd promt in administrator, (start, programs, applications, right click on cmd promt)
    • Navigate to the folder with the TackControlOF.cmd batch file.
    • Run the cmd file by typing 'TakeControlOf <REPLACE WITH FILE/FOLDER TO RESET PERMISSIONS>'

    All the best, one little problem fixed :D
    from Angelz_curse
     
  18. urie

    urie Moderator
    Staff Member

    May 21, 2007
    9,039
    3,388
    300
    Have you never tried just booting with a PE cd and copying files never had a problem with permissions