Command Line Removal of Unwanted/Unused User Account


  1. Posts : 13
    Windows 7 Professional Premium 64 bit
       #1

    Command Line Removal of Unwanted/Unused User Account


    Hello. I'm getting ready to upgrade to Win10 Pro (from Win 7 Pro), and I have an old user account I'd like to remove. I'd like to leave no trace of this old account for a clean(er) Win10 install, and I know that I can't just delete it using the Win 7 Explorer file tree view (so I've been warned here).


    Can anyone instruct me as to how to do this at the command prompt? What would I look for in the registry, etc? What I've read up on so far looks a bit confusing...


    Thanks! Tom F.
      My Computer


  2. NoN
    Posts : 4,166
    Windows 7 Professional SP1 - x64 [Non-UEFI Boot]
       #2

    Is this the Administrator account created at first use? Otherwise you might have to keep it for the upgrade

    see "Control Panel => Users Accounts => Manage another account"

    Maybe you could delete the unwanted account? If it is another "Standard User" or another byside "Administrator Account" it will allow you to delete those accounts.

    If you’re running Windows 7 SP1 or Windows 8.1 Update, in most cases, you’ll be able to keep your Windows settings, personal files, and most apps when you upgrade to Windows 10. During the upgrade, setup will let you know if there’s anything that’ll be removed—but it’s always a good idea to back up your files before you start upgrading.
    Upgrade to Windows 10 | Tutorials

    And

    While the Windows 10 free upgrade offer through the Get Windows 10 (GWX) app ended on July 29, 2016, you can still upgrade from Windows 7 to Windows 10 for free using the Windows 10 Media Creation Tool (MCT) if you upgrade from a legally activated Windows 7.
    http://While the Windows 10 free upg...ted Windows 7.
      My Computer


  3. Posts : 7,107
    W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
       #3

    Hi

    follow this

    User Account - Delete

    option 3 is what your after.

    note read posts #11 onward

    Roy
      My Computer


  4. Posts : 13
    Windows 7 Professional Premium 64 bit
    Thread Starter
       #4

    NoN said:
    Is this the Administrator account created at first use? Otherwise you might have to keep it for the upgrade

    see "Control Panel => Users Accounts => Manage another account"

    Maybe you could delete the unwanted account? If it is another "Standard User" or another byside "Administrator Account" it will allow you to delete those accounts.
    Actually, it's a previous user account. When you look at this 'user' folder using the Win Explorer view, (under 'Users' ) there's an icon of a padlock on this account's folder (and on the two active user folders). How do I 'unlock' it? Is this 'lock' an indication that the folder is somehow restricted, keeping me from deleting it?
      My Computer


  5. Posts : 13
    Windows 7 Professional Premium 64 bit
    Thread Starter
       #5

    torchwood said:
    Hi

    follow this

    User Account - Delete

    option 3 is what your after.

    note read posts #11 onward

    Roy
    Thanks! I used option 3, and all of the sub-folders unders this particular user account are now gone. And I was able to restart. But the main folder (the actual named old user account folder I'm trying to get rid of) remains.


    Now, that old folder has a padlock icon on it (in the Win Explorer view), as do the two active user accounts (one is an admin) that I am using, and I can't delete it at the command prompt. How do I 'unlock' it? Is this a command prompt thing too?
      My Computer


  6. NoN
    Posts : 4,166
    Windows 7 Professional SP1 - x64 [Non-UEFI Boot]
       #6

    T R Finlay said:
    Actually, it's a previous user account. When you look at this 'user' folder using the Win Explorer view, (under 'Users' ) there's an icon of a padlock on this account's folder (and on the two active user folders). How do I 'unlock' it? Is this 'lock' an indication that the folder is somehow restricted, keeping me from deleting it?

    What if you right click on the padlocked folder and choose the tab 'Share With" to stop sharing that folder? Then try to delete the incriminate folder manually? those accounts might not exist anymore if in "Manage another Account" stays only the main one and invited one
      My Computer


  7. Posts : 13
    Windows 7 Professional Premium 64 bit
    Thread Starter
       #7

    Solved!


    Got the folder deleted! Here's how, from a doc I found via a search here.


    > Trying to delete this User folder, I got the following message " You require permission from SYSTEM to make changes to this file.”I got this even when logged in as administrator.
    1. Right click on the folder (or file) what you want to delete which has this annoying problem – choose Properties.
    2. Go to “Security” tab – “Advanced."
    3. Go to “Owner” tab – “Edit”
    4. On the “Change owner to:”, click on the username you are using at the moment and then tick the “Replace owner on subcontainers and objects”. Press OK to save and keep pressing OK until you close all the windows.
    5. Again, do a right click on the folder/file – then choose Properties.
    6. Again, Go to “Security” tab – “Advanced.”
    7. On the “Permissions” tab (where you should benow), go to “Change Permissions.”
    8. Keep the “Include inheritable permissions fromthis object’s parent” unchecked BUT check the “Replace all childobject permissions with inheritable permissions from this object.”
    9. Press “OK” to confirm and “Yes” on the pop-upwindow:
    10. Keep pressing “OK” until you close all the pop-up windows.
    11. Now delete the file/folder with the “You require permission from SYSTEM to make changes to this file” issue.
    The User folder I wanted gone is now gone!

    Many thanks to all who helped!


    Tom F.



      My Computer


  8. NoN
    Posts : 4,166
    Windows 7 Professional SP1 - x64 [Non-UEFI Boot]
       #8

    Great you solved that one...I had the same problem with two folders (not users ones) in my C:/ drive I couldn't rid off using the method you found, but I had to go in chess mode, no way to give the rights by pressing OK hundred times in normal session.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:18.
Find Us