• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Using Vista? Can't Delete a file in system32? This Thread is for you!

Status
Not open for further replies.
Level 10
Joined
Jun 26, 2005
Messages
236
Vista users, ever tried to delete a file in your default Vista folders, and it doesn't allow you to? Then read on, and you will never experience the problem again.

1. Open Notepad, and type the following into it:

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"Extended"=""
"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]
@="Take Ownership"
"Extended"=""
"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"

2. Now, go to File > Save As > and save it as <anythingyouwant.reg>.

3. Now Right Click the .reg file, and click Merge

4. You'll need to grant permission, click Continue.

5. Microsoft Registry Editor will give you a security warning, click Yes.

6. A message will tell you the Registry has been successfully added, click OK.

7. Now, go to the folder/file you want to delete, and Shift + Right Click it.

8. Go down the the option that says Take Ownership, and click it.

9. You'll need to grant permission, click Continue.

10. When the file/folder that you want to delete is under your ownership, Right Click it and click Properties.

11. Go to the Security tab, and click Edit.

12. Tick every single check box, for every single group/user, and press Apply, then OK, then OK.

10. Now delete the file/folder, if it doesn't work, either:
a) This file/folder is VITAL for your computer to stay running.
b) The file/folder is in use by a program.

PS: If you want to remove the Registry, open Notepad, then type:

Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shell\runas]

[-HKEY_CLASSES_ROOT\Directory\shell\runas]

(i) Now, go to File > Save As > and save it as <anythingyouwant.reg>.

(ii) Then Right Click it, and click Merge.

~Regards Bone~

Edit your Registry at your own risk, I will take no blame for the ruining of your Registries.
 
Level 10
Joined
Jun 26, 2005
Messages
236
You still won't be able to delete it, think before you post. All default vista files are owned by "Trusted Installer". You can't delete them untill you gain control of them, this shows you how to do that.
 
Status
Not open for further replies.
Top