Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I can't access this log file for some reason. This is what I have tried so far:

  • run prompt: C:\Windows\Logs\CBS\CBS.log
  • notepad: C:\Windows\Logs\CBS\CBS.log
  • elevated cmd: C:\Windows\Logs\CBS\CBS.log
  • notepad++

notepad - access denied

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>C:\Windows\Logs\CBS\CBS.log
Access is denied.

C:\Windows\system32>

notepad++ - can not open file

What am I missing? How do I access this file?

I am trying to view this log as part of a system file checker operation. It has found corrupted files and it clearly indicated that I can find the log in this location.

Windows Resource Protection found corrupt files and successfully repaired
them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For
example C:\Windows\Logs\CBS\CBS.log

But for some unfounded reason Windows doesn't allow me to view this file. Why?...

share|improve this question
    
Best way is to just get around it. Use an Ubuntu live CD or any other Linux Live from USB. Boot it up, do whatever you want. (and be careful.) –  Shiki Jun 13 '13 at 17:27
1  
But you can find some solutions here as well: sevenforums.com/performance-maintenance/… –  Shiki Jun 13 '13 at 17:28
    
Allow me to highlight the important part from that page: This is a massive file of approximately 5MB and if you care to see it all, you must send CBS.log to one of your own folders from where you can double click on it. It will then open with Notepad. Note: You cannot open it inside the CBS folder. You will get an Access denied message. As I noted in the answers below it is not entirely necessary to copy the file anywhere. But copying it to a folder within the user profile folder will definitely make the file open without restrictions. So thumbs up for that! –  sammyg Jun 13 '13 at 18:26
    
By the way, my log file is 17 MB in size. If 5 MB is massive, then mine is gigantic! In fact it takes some time for Notepad to swallow all that and show the contents. It's advised to use some alternative editor like Notepad++ instead. I mean if you don't want to see Notepad crash. –  sammyg Jun 13 '13 at 18:29
    
17MB is not massive. Those logs can be several hundreds of MB and if you enable verbose logging the file can be several GB. –  magicandre1981 Jun 14 '13 at 4:13
add comment

4 Answers

up vote 4 down vote accepted

You must run the tools elevated (as admin) to open the file:

http://windows.microsoft.com/en-US/windows7/How-do-I-run-an-application-once-with-a-full-administrator-access-token

You can also copy the file to your desktop and open it there.

share|improve this answer
    
What tools? cmd? I did. Note that cd is at C:\Windows\system32> this is the default location when you run cmd with administrator privileges. Is there some other tool I can use? Besides cmd and notepad? –  sammyg Jun 13 '13 at 17:53
    
all tools. change the dir to CBS (cd\Windows\Logs\CBS ENTER) and here you can type notepad cbs.log –  magicandre1981 Jun 13 '13 at 17:55
    
Thanks! That worked. –  sammyg Jun 13 '13 at 18:02
    
One small correction: there is no need to cd to the log parent directory. Just open up an elevated cmd window, and while at c:\windows\system32 just type in notepad C:\Windows\Logs\CBS\CBS.log and hit Enter. The only important thing is to have notepad in front of the search path. So running C:\Windows\Logs\CBS\CBS.log results in access denied, while notepad C:\Windows\Logs\CBS\CBS.log opens the file. Regardless of current directory in cmd. –  sammyg Jun 13 '13 at 18:10
    
Again, thank you! This is better than having to copy the file back and forth. This is much more convenient. Although, copying the file to desktop and then opening it worked too. –  sammyg Jun 13 '13 at 18:11
add comment

The Microsoft article on SFC suggests using the following command to copy the SFC entries from the log to your desktop. You should then be able to open it in Notepad.

1.Open an elevated command prompt as described in the previous step 1.

2.At the command prompt, type the following command, and then press ENTER:

findstr /c:"[SR]" %windir%\Logs\CBS\CBS.log >"%userprofile%\Desktop\sfcdetails.txt"

share|improve this answer
    
This results in a much smaller output file with only the relevant information. So this could be useful if you are only interested in things that concern SFC (system file checker). This makes use of the findstr (find string) command which searches the string [SR] within the CBS.log file. The output is then sent to the current users desktop with the name sfcdetails.txt. That's pretty neat. Now does anyone know what [SR] stands for? SR what?... I mean it doesn't explicitly say "SFC" but I guess there's some meaning to it. –  sammyg Jun 13 '13 at 18:44
    
This is actually more concerned with filtering out and reading only the information relevant in my particular situation (reading the entries from the log that are produced by the SFC command). So this is very useful for my particular situation, but it doesn't directly address the question (how to access the log file). But I greatly appreciate this, it made it much easier for me to find the relevant entries in the log. Thanks! –  sammyg Jun 13 '13 at 18:47
add comment

I think you should be able to take a copy and open that.

share|improve this answer
    
There shouldn't be a need and there is in fact no need to copy it anywhere. On any intelligent operating system one must be able to open files, and one needs to be able to open files from their current location. So running notepad C:\Windows\Logs\CBS\CBS.log will open in an elevated cmd window will open the file in notepad. But I made sure to check your solution, and as it turns out copying the file to e.g. Desktop will make it readable. When it was on Desktop I could open it in Notepad by a simple double click. –  sammyg Jun 13 '13 at 18:16
    
But to copy it I had to confirm an UAC prompt. File copy failed however with TeraCopy. TeraCopy is an alternative file copy handler for Windows that I use. It replaces the default Windows copy handler. It results in an error. So I had to temporarily switch back to Windows file copy handler to make the UAC prompt show up and confirm it. So watch out anyone using TeraCopy or FastCopy or any of the other file copy handlers! –  sammyg Jun 13 '13 at 18:18
    
TQ. I knew all this already (though not TeraCopy etc) but as it seemed you did not I tried to keep the answer simple. We now have options so hopefully "all's well ..." –  pnuts Jun 13 '13 at 18:19
1  
Alright, cool. Thanks for keeping it simple then. You got an up-vote. –  sammyg Jun 13 '13 at 18:20
add comment

Go back to cmd (right click and run as administrator) and type in:

notepad C:\Windows\Logs\CBS\CBS.log

Then hit ENTER.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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