Why Can’t I Delete My Chrome Folder?

0
0
Asked By ChocoDreamer42 On

I'm having a problem with deleting my Chrome folder in the AppData directory under my user account. I can rename the folder just fine, but when I try to delete it, I encounter an error that says there are files in the folder, even though Chrome isn't running. I'm using a PowerShell script to check for the logged-on user and trying to delete the path: C:Users$LoggedOnAppDataLocalGoogleChrome. Is there something I'm missing?

2 Answers

Answered By TechGuru88 On

It sounds like you might be facing an XY problem. Instead of trying to force delete, make sure Chrome really isn't running in the background. You might want to check the Task Manager just to be sure. By the way, using Get-WmiObject may not be the best way to get the logged-on user. Have you looked into other options?

CuriousCat77 -

I'm actually just trying to delete the folder completely. The error I get is pretty vague, just saying there are files in it, but I've confirmed no Chrome processes are active. That's why I used Get-WmiObject; I thought it would help me target the correct user's folder.

Answered By ScriptingNinja93 On

Just a heads up, the user profile path may not always match exactly with your username. It might be better to check the user profile list in the registry or peek into the "Users" directory to get the right path for the Chrome folder.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.