It is not possible to reset a password while in Repair Mode.
Here are two easy and one painful method to reset a Windows password:
- Log on using the password key file on a USB flash disk (if you ever made one)
- Log on under the alternative admin account (if you ever created one and made a note of its details)
- Use the process below. The process is complex and requires some careful typing.
1. Set your BIOS to use the DVD drive as the primary boot device.
2. Boot with a Windows Repair CD.
3. Press a key when the message indicating "Press any key to boot from CD or DVD …" appears.
4. Select a language, a time and currency, and a keyboard or input method, and then click Next. You are now in Repair Mode.
5. Select an Operating System, then click Next.
6. Select the Command Prompt.
7. Identify the correct drive letter for your Windows installation. It could be a drive other than C: but it won't be X:. You do it by typing the commands
dir C:\Win* {Enter}
dir D:\Win* {Enter}
dir E:\Win* {Enter}
etc.
until you find the Windows folder.
I will call that drive "Q:".
8. Type these commands:
cd /d Q:\windows\System32 {Enter}
move sethc.exe \ {Enter}
copy cmd.exe sethc.exe {Enter}
9. Reboot normally.
- When challenged for a password, tap the Shift key five times. You will see a small black screen.
- Type these commands:
net user {Enter}
(To see a list of all accounts that exist on your machine)
net user Administrator {Enter}
(To see if the Administrator account is active)
- Type these commands:
net user "xxx" ppp {Enter}
(Replace xxx with the account for which you wish to set a new password, and ppp with the new password)
net user Administrator /active:yes {Enter}
(To activate the Administrator account if desired)
- Log on under this account, using the new password.
- Reboot the machine into Repair Mode as per Steps 1..6 above.
- Type these commands:
cd /d Q:\windows\System32 {Enter}
copy \sethc.exe {Enter}
- Reboot into Windows.
Instead using a Windows Repair CD in Step 2, you can use your Windows 7 Installation DVD. The steps are similar to the ones above.
When the pain has subsided, suggest to your friend that a small amount of planning ahead will save her the pain next time round.