How do I gain access over C:\Windows\Logs\CBS\CBS.log?

4

1

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?...

Samir

Posted 2013-06-13T17:20:10.893

Reputation: 17 919

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.) – Apache – 2013-06-13T17:27:33.687

1

But you can find some solutions here as well: http://www.sevenforums.com/performance-maintenance/56234-make-cbs-log-useable.html

– Apache – 2013-06-13T17:28:25.160

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! – Samir – 2013-06-13T18:26:12.053

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. – Samir – 2013-06-13T18:29:14.407

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 – 2013-06-14T04:13:17.603

Answers

4

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.

magicandre1981

Posted 2013-06-13T17:20:10.893

Reputation: 86 560

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? – Samir – 2013-06-13T17:53:31.927

all tools. change the dir to CBS (cd\Windows\Logs\CBS ENTER) and here you can type notepad cbs.log – magicandre1981 – 2013-06-13T17:55:37.247

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. – Samir – 2013-06-13T18:10:24.287

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. – Samir – 2013-06-13T18:11:55.043

3

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"

David Marshall

Posted 2013-06-13T17:20:10.893

Reputation: 6 698

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. – Samir – 2013-06-13T18:44:14.383

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! – Samir – 2013-06-13T18:47:23.147

1

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

pnuts

Posted 2013-06-13T17:20:10.893

Reputation: 5 716

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. – Samir – 2013-06-13T18:16:09.123

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! – Samir – 2013-06-13T18:18:39.727

1Alright, cool. Thanks for keeping it simple then. You got an up-vote. – Samir – 2013-06-13T18:20:41.500

0

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

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

Then hit ENTER.

andrew

Posted 2013-06-13T17:20:10.893

Reputation: 1

0

Open Start Menu > select Accessories > right-click on Notepad > select Run as Administrator. After Notepad opens > select File > Open > when Win File Explore window opens > select File Type drop down menu > select All splat.splat > go to C:\Windows\Logs\CBS\ > select CBS.log > select Open

Don Hoehn

Posted 2013-06-13T17:20:10.893

Reputation: 1