Delete Profile From Registry Windows 10clevervia

Posted on

Confirm the delete within the dialog box shown. This allows you to remove old, unused network profile entries. Delete Network profiles in Windows 8.x. I’ve described the way to remove old network profiles in Windows 8 using the registry editor within this German blog post. Launch regedit via Windows 8/8.1 start page (search box). Delete the User Profile via Registry Editor Lets us see this in more detail. 1 Delete User Profile using Advanced System Management The first step here is to open the Run dialog box by pressing.

  1. Delete User Profile Via Registry
  2. Delete Profile From Registry Windows 10

Reg command allows us to delete registry keys and registry values from command line. This reg command can be used from batch files also. The syntax for the delete operation is explained below with examples.

Delete a registry value

Example:

Delete the registry value ‘CleanShutdown‘ under the key ‘HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorer

If you want to delete registry key without being prompted for confirmation then add /f switch to the command.

Manually

Example:
For the above example, the command to delete the registry value without any confirmation prompt:

If the registry key has space in its name, you can use double quotes as below.

Example:
Command to delete the registry value ‘TSAdvertise‘ under the registry key ‘HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server’

Delete a registry key

Delete all registry keys and values under a registry key:

Example:
Delete all the registry values under the key ‘HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionAppletsRegeditFavorites’

Delete all registry values under a registry key

Learning has never been so easy!

There are two different steps to deleting a user profile in Windows 7, first the users' files & second their profile registry key.

7 Steps total

Step 1: Navigate to C:Users

Windows

Delete User Profile Via Registry

Step 2: Delete the folder of the profile you want to remove

Step 3: Open regedit

Start Menu> Run> Regedit

Step 4: Navigate to the Profile List Registry Key

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionProfileList

Step 5: Under ProfileList navigate to their binary key

Example binary key: S-1-5-21-3656904587-1668747452-4095529-500

Step 6: Export their binary key to a safe place

This can be your desktop or even to a flash drive for safekeeping

Step 7: Delete the binary key

if you need to login as the user whose profile has just been deleted, the computer will think this is the first time they've logged onto the PC.

12 Comments

Delete Profile From Registry Windows 10

  • Mace
    ErikN May 8, 2013 at 12:27pm

    This seems like a very involved method to remove a user profile. How do the results compare with what happens if you go through the GUI to remove a profile?

  • Jalapeno
    Joel Maxwell Nov 5, 2013 at 06:41pm

    I used to do it this way, however I found it was much easier to right-click on My Computer and choose Properties, click the advanced tab, click user profiles, choose the account from the list and then select delete. Much easier I find!

  • Poblano
    John8968 Dec 10, 2013 at 11:25am

    This is a very useful method if you want to rebuild a profile, Eg rename the directory and then delete the reg key. You can then easily cut/paste desktop/my docs bookmarks etc

  • Pimiento
    johnferry Feb 10, 2015 at 10:58am

    Good instructions for thorough removal of profiles. Clears out Temp profiles also which cluttered on of our PC to no end.

    Furthermore, it protects your very own identification while navigating online and characteristics a data safe for you to securely store your computer files in an encrypted vault that is digital. Don’t forget to read instructions after installation. Enjoy Download AVG PC TuneUp 2018 Serial Keys Lifetime (1000 working). AVG PC TuneUp 2019 Product key - Serial key Lifetime free DownloadDownload x64: x86: key. Avg ultimate lifetime serial key generator. AVG TuneUp 20.1 Activation Key for Lifetime How to Install and Register AVG TuneUp 20.1 Build 2168 Key? AVG TuneUp Serial Key 2021 is an all-in-one software application for Windows PC, designed to let you and all the computers in your family run at the best speed and efficiency. With AVG TuneUp 20.1 Crack, you can cover all the devices you own.

  • Pimiento
    ajf355 Feb 10, 2015 at 05:07pm

    Cheers John Ferry, it's funny to see the amount of profiles that haven't been used for 1 year plus when PC's are in for a rebuild. This method meant there was effectively no trace of that profile after deleting the key.

    P.S. I no longer have access to the profile i created this article with (AJF42) as it was through a company helpdesk account.

  • Poblano
    David Allie May 11, 2015 at 10:41pm

    Is there a way to automate (script) the process so, for example, all profiles that haven't been accessed in four weeks is removed from both c:users and in the Registry? except for a short-list of local admins?

  • Pimiento
    shaunhoffman Jul 17, 2015 at 03:06pm

    David: use this: http://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool . I use it and it helps me

  • Sonora
    BorgN00b Sep 3, 2015 at 03:22pm

    @ErikN - sometimes in a domained environment, the profile won't show in user accounts> manage users and this, coupled with rebooting the PC and deleting their c:user, is the only way to get local profile cleared.

  • Sonora
    chrisburton2 Mar 6, 2016 at 07:27pm

    I use a batch file to remove old profiles, it works great just remember to run as admin or it wont work.

    [
    @ECHO OFF
    echo ####################################################
    echo # #
    echo # Welcome to the User Profile Deletion tool, #
    echo # this tool will clear old/stale profiles. #
    echo # #
    echo # you will be prompted for days since last logon #
    echo # #
    echo ####################################################
    echo.
    set /p days=days to keep?
    echo.
    set UsersPath=%systemdrive%Users
    DEL /F /Q /A:H %UsersPath%desktop.ini 2>nul>nul
    forfiles /p %UsersPath% /m * /d -%days% /c 'cmd /c echo @file'>%TEMP%users.temp
    FOR /F 'skip=1 tokens=1 delims=' %%P IN (%TEMP%users.temp) DO CALL:UserDeleteJoin %%P
    set userdelete=%userdelete:'=%
    set userdelete=%userdelete:~0,-1%
    GOTO:USERPRESERVE

    :UserDeleteJoin
    if UserDeleteJoin_Skip' (set userdelete=%1 & set UserDeleteJoin_Skip=1) ELSE (set userdelete=%1,%userdelete%)
    goto:eof

    :USERPRESERVE
    set userpreserve='All Users,Default,Default User,USAF_Admin,Public,burtonc,burtonc.adm,bettua.adm,hookerb.adm,hasenzat.adm,'

    FOR /f 'tokens=*' %%a IN ('reg query 'hklmsoftwaremicrosoftwindows ntcurrentversionprofilelist'^ find /i 's-1-5-21') DO CALL :REGCHECK '%%a'
    GOTO VERIFY

    :REGCHECK
    set SPACECHECK=
    FOR /f 'tokens=3,4' %%b in ('reg query %1 /v ProfileImagePath') DO SET USERREGPATH=%%b %%c
    FOR /f 'tokens=2' %%d in ('echo %USERREGPATH%') DO SET SPACECHECK=%%d
    IF ['%SPACECHECK%']['] GOTO REGCHECK2
    GOTO USERCHECK

    :REGCHECK2
    FOR /f 'tokens=3' %%g in ('reg query %1 /v ProfileImagePath') DO SET USERREGPATH=%%g
    GOTO USERCHECK

    :USERCHECK
    FOR /f 'tokens=3 delims=' %%e in ('echo %USERREGPATH%') DO SET USERREG=%%e
    FOR /f 'tokens=1 delims=.' %%f IN ('echo %USERREG%') DO SET USERREGPARSE=%%f
    ECHO %USERPRESERVE% find /I '%USERREGPARSE%' > NUL
    IF ERRORLEVEL=1 GOTO DELETECHECK
    IF ERRORLEVEL=0 GOTO SKIP

    :DELETECHECK
    FOR /f 'tokens=3 delims=' %%e in ('echo %USERREGPATH%') DO SET USERREG=%%e
    FOR /f 'tokens=1 delims=.' %%f IN ('echo %USERREG%') DO SET USERREGPARSE=%%f
    ECHO %userdelete% find /I '%USERREGPARSE%' > NUL
    IF ERRORLEVEL=1 GOTO SKIP
    IF ERRORLEVEL=0 GOTO CLean
    GOTO:EOF

    :SKIP
    ECHO Skipping user clean for %USERREG%
    GOTO :EOF

    :CLEAN
    set /a profiles=%profiles%+1
    ECHO Cleaning user profile for %USERREG%
    rmdir /s 'C:Users%USERREG%' /s /q > NUL
    ECHO Cleaning user registry for %USERREG%
    reg delete %1 /f
    IF EXIST 'C:Users%USERREG%' GOTO RETRYCLEAN1
    GOTO :EOF

    :RETRYCLEAN1
    ECHO Retrying clean of user profile %USERREG%
    rmdir /s 'C:Users%USERREG%' /s /q > NUL
    IF EXIST 'C:Users%USERREG%' GOTO RETRYCLEAN2
    GOTO :EOF

    :RETRYCLEAN2
    ECHO Retrying clean of user profile %USERREG%
    rmdir 'C:Users%USERREG%' /s /q > NUL
    GOTO :EOF

    :VERIFY
    FOR /f 'tokens=*' %%g IN ('reg query 'hklmsoftwaremicrosoftwindows ntcurrentversionprofilelist'^ find /i 's-1-5-21') DO CALL :REGCHECKV '%%g'
    GOTO REPORT

    :REGCHECKV
    set SPACECHECKV=
    FOR /f 'tokens=3,4' %%h in ('reg query %1 /v ProfileImagePath') DO SET USERREGPATHV=%%h %%i
    FOR /f 'tokens=2' %%j in ('echo %USERREGPATHV%') DO SET SPACECHECKV=%%j
    IF ['%SPACECHECKV%']['] GOTO REGCHECKV2
    GOTO USERCHECKV

    :REGCHECKV2
    FOR /f 'tokens=3' %%k in ('reg query %1 /v ProfileImagePath') DO SET USERREGPATHV=%%k
    GOTO USERCHECKV

    :USERCHECKV
    FOR /f 'tokens=3 delims=' %%l in ('echo %USERREGPATHV%') DO SET USERREGV=%%l
    FOR /f 'tokens=1 delims=.' %%m IN ('echo %USERREGV%') DO SET USERREGPARSEV=%%m
    ECHO %USERPRESERVE% find /I '%USERREGPARSEV%' > NUL
    IF ERRORLEVEL=1 GOTO VERIFYERROR
    IF ERRORLEVEL=0 GOTO :EOF

    :VERIFYERROR
    SET USERERROR=YES
    GOTO :EOF

    :REPORT
    IF [%USERERROR%][YES] (
    set RESULT=FAILURE
    ) ELSE (
    set RESULT=SUCCESS
    )

    echo Total Profiles Cleaned is %profiles%
    Pause
    :EXIT
    exit

    :EOF
    ]

  • Sonora
    thomas skibinski Mar 11, 2016 at 02:27pm

    Thank you! For some reason the Windows GUI wouldn't allow me to delete a particular user and this process worked.

  • Jalapeno
    tekkie Jul 3, 2018 at 06:57pm

    @chrisburton2
    Hello, I know this is old but your process worked..for some profiles but most did not delete. Any ideas on why and what I can do to resolve this?

  • Thai Pepper
    Chris12321 Sep 12, 2019 at 01:26pm

    I use this method a lot its cleaner than the other way in my opinion.