Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to fix an issue with Windows registry and services. I tried running sfc command but this is the error message I get?

C:\Windows>sfc /scannow

Beginning system scan.  This process will take some time.    

There is a system repair pending which requires reboot to complete.  Restart
Windows and run sfc again.

C:\Windows>

But I have rebooted several times since this message first appeared, and I even tried running the command in safe mode and in console mode but I still get the same message. How do I get rid of it?

There is this file in winsxs folder: C:\Windows\winsxs\cleanup.xml

This is it's content:

<?xml version='1.0' encoding='utf-16'?>
<PendingTransaction >
    <POQ postAction="NoReboot">
        <DeleteFile path="\??\D:\$$DeleteMe.CbsMsg.dll.01c85bd2f5893b40.0000"/>
    </POQ>
</PendingTransaction>

Could this be something? Is this the cause? Is it safe to delete this file?

Update

I tried renaming it but the operation failed.

I ran the explorer.exe with elevated privileges and navigated to the location. I got the UAC confirmation prompt and then the error below.

Destination Folder Access Denied
You need permission to perform this action

How do I rename or delete this file? Do I need to use cmd or be in safe mode to do it?

Update 2

I started safe mode with command prompt and tried taking ownership of the file and then renaming it. Rename failed.

C:\Windows\winsxs>ren cleanup.xml cleanup.xml.old
Access is denied.

C:\Windows\winsxs>takeown /f "cleanup.xml"

SUCCESS: The file (or folder): "C:\Windows\winsxs\cleanup.xml" now owned by user
 "mycomputername\username".

C:\Windows\winsxs>ren cleanup.xml cleanup.xml.old
Access is denied.

C:\Windows\winsxs>

I also issued following command.

C:\Windows\system32>icacls "C:\Windows\winsxs\cleanup.xml" /grant username:F
processed file: C:\Windows\winsxs\cleanup.xml
Successfully processed 1 files; Failed processing 0 files

C:\Windows\system32>cd ..\winsxs

C:\Windows\winsxs>ren cleanup.xml cleanup.xml.old
Access is denied.

C:\Windows\winsxs>

It still won't allow me to rename it. I issued these last two commands in normal Windows mode. Does it matter?... I will try a reboot.

share|improve this question
    
Problem solved, by performing a repair install. – sammyg Jun 18 '13 at 10:25
    
I am having the same issue, but I do not have a cleanup.xml file, so I don't think that is the cause. – BlueRaja - Danny Pflughoeft Jul 8 '15 at 7:56
    
@BlueRaja As I recall, it did have something to do with cleanup, but you may not need to have this file to know that you have this problem. Have a look at the second answer. The registry trick may work for you. I ended up doing a repair install if I remember correctly. So I didn't get to try that. – sammyg Jul 8 '15 at 10:48

I have the same issue in Windows 7. I finally got sfc to run using the following commands from the repair console (for some reason, it assigned D: to my main disk, rather than C:)

del d:\windows\winsxs\pending.xml
del x:\windows\winsxs\pending.xml
sfc /scannow /offbootdir=D:\ offwindir=D:\Windows

(However, sfc now tells me

Windows Resource Protection found corrupt files but was unable to fix some of them.

so this did not fix my startup issues)

share|improve this answer
    
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question. – CharlieRB Jul 10 '15 at 17:02
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – Ramhound Jul 10 '15 at 18:09
    
@CharlieRB and Ramhound: huh? Yes, it absolutely does answer the question. The question is "How do you force SFC to run when it gives this error?" I provided the solution I used to force SFC to run when that same thing happened to me. It did not in fact solve my underlying problem, but that is tangential to the question, which is why I only mentioned it at the end (and provided a link to another thread, to help others like me) – BlueRaja - Danny Pflughoeft Jul 10 '15 at 18:11
    
@BlueRaja - You having issues is irrelevant to the author's question though. In other words the second part of the answer is sort of irrelevant to sammyg's problem. How is linking to your own question relevant to how you delete pending.xml ( it isn't ). – Ramhound Jul 10 '15 at 19:01
1  
@Ramhound: Yes, I already said that. However, since there are likely others on the Internet with my same issue, who will find this page through Googling like I did, I added extra related information to point them in the right direction (which is an extremely common courtesy on this site). I don't understand how you could possibly take fault with that. Regardless, I've parenthesized it now, so there's no way someone could confuse it as a necessary part of the answer. – BlueRaja - Danny Pflughoeft Jul 10 '15 at 19:13

This command is supposed to do it.

dism.exe /image:C:\ /cleanup-image /revertpendingactions

But this only works in Windows 7 or newer. I don't have the dism.exe tool in Windows Vista. I just thought I would share it with those who find this question and who do have Windows 7. I was of course unable to test this myself, but this guy says he was able to remove this annoying error message out of the world. So it might be worth a try.

share|improve this answer
    
When I run this command from the repair prompt, I just get Error 0x80029c4a - The request is not supported :( – BlueRaja - Danny Pflughoeft Jul 8 '15 at 7:47
    
What version of Windows is it? – sammyg Jul 8 '15 at 10:42
    
Windows 7 Professional Edition (obtained legally through MSDN) – BlueRaja - Danny Pflughoeft Jul 8 '15 at 20:30
    
I am not too sure this is the same issue then. I was using Windows Vista. As I recall, my original problem was with the Windows Audio service. It was not starting for reasons I cannot recall now. So I had no sound. I was attempting to repair it, but this gave me a new problem. This question describes that new problem. So I do not know what led you to this problem. All solutions found on this site are on "as is" basis. Don't follow every step blinedly without adapting them to your specific problem. – sammyg Jul 9 '15 at 7:47
    
@sammyg - This particular command requires a specific Windows 7 update. Might be useful to specify which one it is, since, the lack of that information has led to confusion 2 years later. – Ramhound Jul 10 '15 at 18:08

look in the registry under SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing if you see a key called RebootPending. This is the place where Windows also checks if there is a pending reboot.

share|improve this answer
    
In HKLM (local machine)?... – sammyg Jun 17 '13 at 9:46
    
Yeah, I have HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending and it contains only the default string value, and it's not set to anything. Should I set it to 0 or something? Or maybe remove the key? – sammyg Jun 17 '13 at 9:49
    
"Cannot delete RebootPending: Error while deleting key." – sammyg Jun 17 '13 at 10:18
1  
take ownership of the key: winaero.com/comment.php?comment.news.210 and now delete it. – magicandre1981 Jun 17 '13 at 14:40
    
Thanks! I will download that reg tool, I'm sure it will come in handy sometime. So it's probably good to have it in the toolbox. – sammyg Jun 18 '13 at 10:23

This worked for me:

sfc /SCANNOW /OFFBOOTDIR=c:\ /OFFWINDIR=d:\Windows

Source: http://blog.crosbydrive.com/?p=339

share|improve this answer
    
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review – JakeGould Dec 14 '15 at 6:31

protected by JakeGould Dec 14 '15 at 6:31

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.