Windows 10 command prompt--"The process cannot access the file because it is being used by another process."
13,069
If you current log on account has admin permission, please try to manually add permission on the log file:
- Right click the log file and select Properties – Security.
- There will be a message about read permission, just click Advanced – Continue.
- Click Add – Select a principal.
- Manually enter your user account and click Check Name, once it has been detected, click OK.
- Select Full control permission and click OK to save the change.
- Click Ok again to save the security change.
Then, re-open the file and you will see all content.
Author by
Simonhawk
Updated on September 18, 2022Comments
-
Simonhawk over 1 year
Trying to open my firewall log file through command line and create a shortcut for it because I can't open it without admin privileges and when I right click, "Run as admin" is not showing I did try going through the settings and adding my account for permissions but I believe since it's a dynamic file, it just resets because after awhile, I would have to redo the process and that's why I was trying to make a shortcut. Need someone to assist me in fixing this problem one way or another so I can view log files on my Windows 10 home computer.
Thank you!
-
Appleoddity over 6 yearsYou’ve explained only part of what you want to do. You haven’t provided any info on what you’ve already tried to make this happen. We have no idea what you want to open these files in. In your title you state an error message but haven’t told us what you do to produce that error. Is that the message you get when you try to open your firewall log?
-
magicandre1981 over 6 yearsyou need to stop the Firewall service before you can open the log file
-
Vomit IT - Chunky Mess Style over 6 yearsWonder if it would allow you to first copy the log file elsewhere and then open it from the elsewhere location without stopping the FW service? Thinking of a potential simple workaround solution that may suffice for the immediate need once confirming it works as expected but simple enough to try.
-
Simonhawk over 6 years@ITSnuggles Having to copy the file over each time is a drag. Is there not a simply, more efficient way of doing this? I believed I've poked at logs before and never had this issue.
-
Simonhawk over 6 years@Appleoddity I didn't show any specific commands, but I did say in the first line that I tried to open it via command line. What gave me this error is using the "start" function (ex: "start C:\path...\Firewall.log"
-
Appleoddity over 6 yearsYou don’t tell us WHAT PROGRAM you want to open your logs in. We can’t guess from your picture. What I can clearly see is that the .log files are NOT what you are trying to open. The icon shows those will open in notepad. The file you’ve right clicked on is not a .LOG file, but because you are also hiding file extensions I can’t guess at what it is, but the icon shows it is different and it is not opening in notepad. The command line you just provided is not what you really tried because the file firewall.log does not exist. Complete filenames and programs are important here. This is simple.
-
Appleoddity over 6 yearsStart by unhiding file extensions for known file types so you can clearly see what type of files you are working with.
-
Simonhawk over 6 years@Appleoddity regular notepad. I added a picture of opening it from the file.
-
Appleoddity over 6 yearsThank you for the extra info. It is getting more clear now, but it appears we are dealing with two issues. Can you run notepad as administrator and then use the file menu to navigate to, and open the log?
-
-
Simonhawk over 6 yearsI already did this. I even said it in the OP. I assume because log files are constantly updating, the permissions have to be reinstated. This is my assumption because after awhile, I have to add permissions again
-
Appleoddity over 6 years@Simonhawk it’s very simply, not a permission issue. Nothing about the error message suggests that.