A Windows Vista forum. Vista Banter

Welcome to Vista Banter.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to ask questions and reply to others posts, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Go Back   Home » Vista Banter forum » Microsoft Windows Vista » Performance and Maintainance of Windows Vista
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Performance and Maintainance of Windows Vista A forum for performance and maintenance tasks in Windows Vista. (microsoft.public.windows.vista.performance_maintainance)

How to Delete a System File in Windows Vista...Access Denied when in System32



 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old March 26th 08, 06:53 PM posted to microsoft.public.windows.vista.performance_maintenance
Jason
external usenet poster
 
Posts: 75
Default How to Delete a System File in Windows Vista...Access Denied when in System32

If you need to delete or overwrite a system file in Windows Vista, you'll quickly notice that you cannot delete system files, even as administrator. This is because Windows Vista's system files are owned by the TrustedInstaller service by default, and Windows File Protection will keep them from being overwritten.

Thankfully, there's a way that you can get around this. You need to take ownership of the files, and then assign yourself rights to delete or modify the file. For this, we'll use the command line.

Open an administrator command prompt by typing cmd into the start menu search box, and hit the Ctrl+Shift+Enter key combination.

To take ownership of the file, you'll need to use the takeown command. Here's an example:

takeown /f C:\Windows\System32\en-US\winload.exe.mui

That will give you ownership of the file, but you still have no rights to delete it. Now you can run the cacls command to give yourself full control rights to the file:

cacls C:\Windows\System32\en-US\winload.exe.mui /G geek:F

Note that my username is geek, so you will substitute your username there.

At this point, you should be able to delete the file. If you still can't do so, you may need to reboot into Safe Mode and try it again. For the filename in the example, I was able to overwrite it without safe mode, but your mileage may vary.


Post Originated from http://www.VistaForums.com Vista Support Forums
  #2 (permalink)  
Old March 26th 08, 11:04 PM posted to microsoft.public.windows.vista.performance_maintenance
Rick Rogers
external usenet poster
 
Posts: 8,428
Default How to Delete a System File in Windows Vista...Access Denied when in System32

Why would one want to delete a system file?

Why would one want to allow malware to circumvent system file protection and
usurp a user's privilege level to alter or delete a necessary system file?

You can alter permissions for system files, but it begs the question as to
whether or not you should. Users are normally blocked out from accessing
these files in normal run mode for a very good reason: to protect the core
system from malware.

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP
http://mvp.support.microsoft.com/
Windows help - www.rickrogers.org
My thoughts http://rick-mvp.blogspot.com

"Jason" wrote in message ...
If you need to delete or overwrite a system file in Windows Vista, you'll
quickly notice that you cannot delete system files, even as administrator.
This is because Windows Vista's system files are owned by the
TrustedInstaller service by default, and Windows File Protection will keep
them from being overwritten.

Thankfully, there's a way that you can get around this. You need to take
ownership of the files, and then assign yourself rights to delete or
modify the file. For this, we'll use the command line.

Open an administrator command prompt by typing cmd into the start menu
search box, and hit the Ctrl+Shift+Enter key combination.

To take ownership of the file, you'll need to use the takeown command.
Here's an example:

takeown /f C:\Windows\System32\en-US\winload.exe.mui

That will give you ownership of the file, but you still have no rights to
delete it. Now you can run the cacls command to give yourself full control
rights to the file:

cacls C:\Windows\System32\en-US\winload.exe.mui /G geek:F

Note that my username is geek, so you will substitute your username there.

At this point, you should be able to delete the file. If you still can't
do so, you may need to reboot into Safe Mode and try it again. For the
filename in the example, I was able to overwrite it without safe mode, but
your mileage may vary.


Post Originated from http://www.VistaForums.com Vista Support Forums


  #3 (permalink)  
Old July 1st 09, 09:53 AM posted to microsoft.public.windows.vista.performance_maintenance
3lncr
external usenet poster
 
Posts: 1
Default How to Delete a System File in Windows Vista...Access Denied when in System32

Jason: Thanks mate for that info. You are GREAT!

Your post help me to delete some faulty saved folder of files on my disk by Vista, which (as an administrator) I couldn't delete, because of some security issues. I've got insufficientt privileges to do that. After your commandlines I simply get rid of it.

Rick: Believe me. There are maaany situations when you need to take over Windows system files and it's not about malware, viruses or whatever. Above, it's just one exception.

Cheers guys.


Post Originated from http://www.VistaForums.com Vista Support Forums
  #4 (permalink)  
Old February 20th 10, 04:14 AM posted to microsoft.public.windows.vista.performance_maintenance
seanhar
external usenet poster
 
Posts: 2
Default How to Delete a System File in Windows Vista...Access Denied when in System32


Well, I have tried all the commands line and nothing I am trying to
delete the OS from a hard drive which after a backup restore did not
load Windows, so now I have it on my laptop and I am trying to get rid
of Vista so I can reload without loosing all my data on the HD.
Anyone???


--
seanhar
  #5 (permalink)  
Old February 20th 10, 04:14 AM posted to microsoft.public.windows.vista.performance_maintenance
seanhar
external usenet poster
 
Posts: 2
Default How to Delete a System File in Windows Vista...Access Denied when in System32


Well, I have tried all the commands line and nothing I am trying to
delete the OS from a hard drive which after a backup restore did not
load Windows, so now I have it on my laptop and I am trying to get rid
of Vista so I can reload without loosing all my data on the HD.
Anyone???


--
seanhar
  #6 (permalink)  
Old February 21st 10, 02:57 PM posted to microsoft.public.windows.vista.performance_maintenance
DL[_3_]
external usenet poster
 
Posts: 687
Default How to Delete a System File in Windows Vista...Access Denied when in System32

You cannot 'get rid of the o/s'
Your post does not give enough detail to work out what you have done, and
thus how you would recover

"seanhar" wrote in message
...

Well, I have tried all the commands line and nothing I am trying to
delete the OS from a hard drive which after a backup restore did not
load Windows, so now I have it on my laptop and I am trying to get rid
of Vista so I can reload without loosing all my data on the HD.
Anyone???


--
seanhar



  #7 (permalink)  
Old February 21st 10, 02:57 PM posted to microsoft.public.windows.vista.performance_maintenance
DL[_3_]
external usenet poster
 
Posts: 687
Default How to Delete a System File in Windows Vista...Access Denied when in System32


You cannot 'get rid of the o/s'
Your post does not give enough detail to work out what you have done, and
thus how you would recover

"seanhar" wrote in message
...

Well, I have tried all the commands line and nothing I am trying to
delete the OS from a hard drive which after a backup restore did not
load Windows, so now I have it on my laptop and I am trying to get rid
of Vista so I can reload without loosing all my data on the HD.
Anyone???


--
seanhar



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:46 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Optimization by vBSEO 3.0.0 RC6
Copyright ©2004-2024 Vista Banter.
The comments are property of their posters.