Can anyone tell me how I can remove all references to previous users on a PC?

One of our users is having a spare PC. I have created a new account and then deleted the previous users account and files but everything is still registered to the old user, even at the DOS promt.

Is it a case of altering every registry entry that mentions the previous user or is there a simple command that will do this for me?

Dani AI

Generated

Good call, — changing the Windows registration strings only updates the product/installation fields. User-specific traces live in several other places and need separate cleanup. The checklist below covers the common leftovers on NT/2000/XP-era machines and newer Windows versions.

  • Remove the profile properly: use the system's User Profiles dialog (Advanced system settings -> User Profiles) to delete the old profile, then remove the profile folder left behind (XP: C:\Documents and Settings\<username>, Vista+/Win7+: C:\Users\<username>). If Windows reports the profile is in use, log in as a different administrator or boot Safe Mode first.

  • Look for per-user registry/data files: an old profile folder will often contain NTUSER.DAT (the per-user registry hive). If that file remains you can back it up and delete the profile folder once the account is gone.

  • Fix command-prompt and shortcuts: if the command prompt opens showing the old user folder, check the Command Prompt shortcut’s “Start in” field and clear or change it. Also inspect desktop and Start Menu shortcuts (including the All Users Start Menu) for hard-coded paths.

  • Clean startup and scheduled items: check the Startup folder, Task Scheduler, and any startup/run entries for references to the old user folder and update or remove them.

  • File ownership and permissions: if files are still owned by the old account, take ownership and reset ACLs via the file Properties -> Security -> Advanced or use appropriate admin tools.

  • For a thorough wipe: consider creating a fresh administrator account and then deleting the old one, re-imaging, or doing a clean install if the PC will be reassigned. For bulk profile cleanup there are community tools (e.g., profile removers) but use them with care and always keep backups.

Quick checks: run whoami and echo %USERPROFILE% to confirm the current account and profile path. Always back up data and system state before deleting profiles or editing low-level settings.

No need to worry, I found it!

Run the Registry Editor (REGEDIT.EXE).
Open HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows NT\ CurrentVersion.
To change the values of the RegisteredOrganization, RegisteredOwner, or ProductId, simply double-click on them.


Cheers!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.