Please note that resetting the password from an account other than the corresponding user account always means that the user loses the credentials stored in the Windows Vault, stored Internet Explorer passwords, and files that you encrypted with the Encrypting File System (EFS). Of course, if you have a backup of these credentials, you can restore them; likewise, if you have exported the private EFS key, you can import it again after you have reset the password.
Like with all other solutions that allow you to reset the Windows password without having an account on the corresponding computer, you have to boot from a second operating system and access the Windows installation while it is offline.
You can do this with a bootable Windows PE USB stick or by using Windows RE. You can start Windows RE by booting the Windows Vista or Windows 7 setup DVD and then selecting “Repair” instead of “Install Windows.”
By the way, you can’t use the Windows XP boot CD for this purpose because its Recovery Console will ask for a password for the offline installation. However, you can use a Vista or Windows 7 DVD to reset a forgotten Windows administrator password on Windows XP.
This works because Windows RE, which is based on Vista or Windows 7, will let you launch a command prompt with access to an offline installation without requiring a password.
If you're changing the password on a 32bit install you need a 32 bit RE, if you're changing the password on a 64bit install you need a 64bit RE.
To access Windows RE when booting from a vista or 7 install disc choose the repair computer option instead of install now at the second prompt, then select the windows install you're working on, then select command prompt. This link explains it in detail.
You can also create a system repair disc to boot into a RE, to do this Click Start, All Programs, Maintenance, Create a System Repair Disc; Insert a CD/DVD into the drive and press Create disc. More here. It should work when using a different computer, but the size of the internal register has to be the same (32bit/64bit).
1.Boot into Windows PE or Windows RE and access the command prompt. If you don't know how to do this refer this link or this link or a few lines up.
2.Find the drive letter of the partition where Windows is installed. In Vista and Windows XP, it is usually C:, in Windows 7, it is D: in most cases because the first partition contains Startup Repair. To find the drive letter, type C: (or D:, respectively) and search for the Windows folder. Note that Windows PE (RE) usually resides on X:.
3.Type the following command (replace “c:” with the correct drive letter if Windows is not located on C:):
copy c:\windows\system32\sethc.exe c:\
This creates a copy of sethc.exe to restore later.
4.Type this command to replace sethc.exe with cmd.exe:
copy /y c:\windows\system32\cmd.exe c:\windows\system32\sethc.exe
5.Reboot your computer and start the Windows installation where you forgot the administrator password.
6.After you see the logon screen, press the SHIFT key five times.
7.You should see a command prompt where you can enter the following command to reset the Windows password (see screenshot above):
net user you_user_name new_password
If you don’t know your user name, just type net user to list the available user names.
8.You can now log on with the new password.
I recommend that you replace sethc.exe with the copy you stored in the root folder of your system drive in step 3. For this, you have to boot up again with Windows PE or RE because you can’t replace system files while the Windows installation is online. Then you have to enter this command:
copy /y c:\sethc.exe c:\windows\system32\sethc.exe
I made a pdf, in case anyone is interested.