Link to home
Start Free TrialLog in
Avatar of Basem Khawaja
Basem KhawajaFlag for United States of America

asked on

Basem Test

I would like  to delete this account Basem Test from the users  list in C drive it wont let me delete it,  it says it is open in another program. How can i delete it ?
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

bring up task manager and sort details by username also check services
Avatar of Bill Prew
Bill Prew

What Exactly do you mean by "users  list in C drive"?


»bp
First logoff user Basem
Avatar of Basem Khawaja

ASKER

when u go to c drive in  file explorer under click on the c drive there is a listing called users when i click on the users there is a name or an entry called Basem Test that I need to get rid of
Expert Comment  by:David Johnson, CD, MVP
ID: 4223301410h
bring up task manager and sort details by username also check services

***Can you please further elaborate in details what do I need to do to delete Basem Test??***
I looked under services and users in task manager there was no listing of Basem Test.
screen capture
Basem-Test.JPG
from an elevated command prompt  (run as administrator
takeown /f "c:\users\Basem Test" /r /d n
once completed ignore any errors
from explorer right click on c:\users\Basem Test select properties, add your username give it full control this folder and all subfolders
replace permissions
apply ok
now delete the folder
David

I did what u suggested but it did not get deleted. my user name Basem Khawaja had already full control and the permissions under advanced  also. command prompt returned success in multiple entries no error messages. Pls help
David

Do i enter this entire line into the command screen or what is between the parentheses  takeown /f "c:\users\Basem Test" /r /d n
the whole thing
I did enter the whole line to the command prompt. Can u please describe the following steps in easy to understand details. c:\users\Basem Test select properties, add your username give it full control this folder and all subfolders
replace permissions
apply ok
David

Thank you for the video. I followed every step however at 1:04 video i did not get the error message yellow triangle but I clicked ok till the end then tried to delete noting got deleted. see command screen too
command-screen.JPG
did you then try deleting from explorer
or from an cmd (run as administrator)
cd users
rd "c:\users\Basem Test" /s /q
I tried deleting from c drive users list.

what do I need to do with this ?? cd users
rd "c:\users\Basem Test" /s /q
did you try it and what was the result

rd - remove directory   /s   - and subdirectories /q - quiet
do I put this in the command prompt?                  rd - remove directory   /s   - and subdirectories /q - quiet
Hi Basem,

do I put this in the command prompt?  rd - remove directory   /s   - and subdirectories /q - quiet

No, David was just explaining what the command and switches do...

rd - this command removes a directory
/s - this command "switch" tells Windows to also remove sub-directories
/q - this command "switch" tells windows to do it 'quietly'  :)

The command you want to run in the command prompt shell is as David indicated in this answer

  1. Press your Windows Key and type "Command"
  2. Right Click the "Command Prompt" result and select "Run as administrator"
  3. Click "Yes" to the User Account Control prompt
  4. Type the following commands, exactly as shown and press your Enter key after each line to execute the commands

cd \users

rd "c:\users\Basem Test" /s /q

Note the above is exactly what expert David Johnson has asked you to do.  All I've done here is used a different method to explain it.

Hope that's helpful.

Andrew
Do all the steps as the various suggestions but do it as SYSTEM
psexec -s -i -d cmd.exe

Open in new window

https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
Andrew
I did what u told me this is what I got. see capture. can u tell me how to go about shaun's answer.thx
command-results.JPG
it would appear that realplayer is open and using that account
Hi Basem,
can u tell me how to go about shaun's answer.thx
To follow Shaun's suggestion, you will first need to download and install the command he's talking about into Windows.

If you follow the technet link he provided, you will see a link to Download PSTools (2.7 MB) - That's what you need to download.  Alternatively, just click the link below and save the PSTools.zip file to your downloads folder.

https://download.sysinternals.com/files/PSTools.zip

Once done, extract PsExec.exe (if your system is 32bit Windows) or PSExec64.exe (if your system is 64bit Windows) and place it in your C:\Windows folder. Unless you have an Unzip utility installed, you can do this with Windows explorer as follows;

  • Double click the dlownloaded PSTools.zip file inside Windows Explorer
  • Click once on PsExec.exe (for 32bit Windows) or PsExec64.exe (for 64bit Windows), right click and select Copy
  • Navigate to C:\Windows in Windows Explorer, then right click and select "Paste"
  • You will probably get a "Destination Folder Access Denied" message. Click the "Continue" button
  • Now double click the file you just copied.  If you've copied the 64bit file, you will get a warning that "The app you're trying to install isn't a verified app from the Store" That's fine, the file is safe so just click "Install anyway"
  • The PsExec "License Agreement" window opens. Click the "Agree" button
  • Close Windows Explorer

Open a command prompt as shown before and you will now be able to run Shaun's suggestion. Just type;

psexec -s -i -d cmd.exe into the command shell and a new Command Shell will open, only this time anything typed in there will run with elevated System privileges.

Now try tunning David's suggestion again in the new shell.  rd "c:\users\Basem Test" /s /q

Try it, but I suspect that still may not work until the Realplayer Process is killed from the Basem Test profile.  That's what causing the problem with not being able to completely delete that profile.  

Ensure you are logged OUT of the "Basem Test" account before trying to delete the account.  If you're not sure if you are or not, restart Windows 10 and log back into your normal account profile and then try the steps above again.

Hope that helped.

Andrew
ASKER CERTIFIED SOLUTION
Avatar of Andrew Leniart
Andrew Leniart
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i would assume it is not Realplayer but the Explorer that has opened the 'basem test' folder.

you may close all tasks and reboot to make sure that all concurrent programs would be down.

then open the cmd window in administrator mode and try again to delete the folder users\"Basem Test".

if it still fails with the message 'open by another user ...' you may click to start menu again and type Services.

this should open the services applet. sort the list by name and check whether there is a service started with name realplayer or similar. if so, right-click on it and try to terminate the service. you don't may have worries. if you stop services but do not change the properties, they would be restarted with next boot.

if there is no service for realplayer which might block the folder, it might have a different name. type RegEdit at the commandline what should open the registry editor. search for "Basem Test" by using Edit-Find menuitem. if there are results try to findout whether those entries belong to a program or application you know. if so, it would be best to uninstall this program, since it is very likely that the program was started automatically after login and then blocked the folder. it would be not impossible to find out where it was started and prevent it from starting. but that wouldn't solve the issue that the program was configured by using a folder of a different user. if the entries are not associated with a program, they might be used by a service. to check this, you could go back to the services applet. at top there is a button with tooltip 'export list'. clicking on the button would export whole list to a text file. choose a simple target path like c:\temp\services.txt.
then open the  text file with an editor and search for the names you found with regedit. whenever there is a match you should terminate the service and try to delete the user folder again. on success you have found the pulprit. then change the properties of the service either to 'manual' or to 'deactivated'.

Sara
once again Andrew u came through to help me u are a genius . I was able to delete it