1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Windows Force file removal

Discussion in 'Software' started by rev_ollie, 14 Jan 2011.

  1. rev_ollie

    rev_ollie Over-whatting??

    Joined:
    21 Aug 2010
    Posts:
    27
    Likes Received:
    0
    Hey,

    Ok just installed a new SSD and now have my old hard drive as a backup.
    Does anyone know a good way to force remove old Windows files?

    Its the old Windows folder I'm trying to remove and it keeps saying I need permissions from TrustedInstaller, and won't let me delete it.

    Its not in use any more so I don't see why it should be locked still.
    I've tried by passing the recycle bin, safe mode and DOS but can't shift it.
    Any ideas?
     
  2. IvanIvanovich

    IvanIvanovich будет глотать вашу душу.

    Joined:
    31 Aug 2008
    Posts:
    4,870
    Likes Received:
    252
    you need to take ownership, then you can delete. right click go to properties, security, advanced, it will show current owner=trusted installer, edit, select your username, tick replace owner on subcontainers and hit apply and ok. you may also need to change permissions, also on the security tab, hit edit and give your user full control.
    if that sounds like too much work you can copy/paste this into notepad and save it as a .reg >>>

    Windows Registry Editor Version 5.00

    [-HKEY_CLASSES_ROOT\*\shell\runas]

    [HKEY_CLASSES_ROOT\*\shell\runas]
    @="Take Ownership"
    "Icon"="C:\\Windows\\System32\\imageres.dll,-78"
    "NoWorkingDirectory"=""

    [HKEY_CLASSES_ROOT\*\shell\runas\command]
    @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

    [-HKEY_CLASSES_ROOT\Directory\shell\runas]

    [HKEY_CLASSES_ROOT\Directory\shell\runas]
    @="Take Ownership"
    "Icon"="C:\\Windows\\System32\\imageres.dll,-78"
    "NoWorkingDirectory"=""

    [HKEY_CLASSES_ROOT\Directory\shell\runas\command]
    @="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"

    [-HKEY_CLASSES_ROOT\dllfile\shell]

    [HKEY_CLASSES_ROOT\dllfile\shell\runas]
    @="Take Ownership"
    "HasLUAShield"=""
    "NoWorkingDirectory"=""

    [HKEY_CLASSES_ROOT\dllfile\shell\runas\command]
    @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"


    <<<<<
    gives a right click "take ownership" option on context menu which just automates the steps i outlines above.
     
  3. sb1991

    sb1991 What's a Dremel?

    Joined:
    31 May 2010
    Posts:
    425
    Likes Received:
    31
    I'd just boot into some other OS from a CD (ubuntu works well) and delete it from there.
     
  4. allan29t

    allan29t What's a Dremel?

    Joined:
    8 Apr 2010
    Posts:
    13
    Likes Received:
    0
    Unlocker is doing it and is free.
     

Share This Page