@Muhammad Ahsan
If you had created a system restore point on your Windows 10 installation before you deleted the admin account and would like to restore the administrator account:
- Boot your computer from a Windows 10 setup/installation disc. After the computer boots up, choose your language, click Next, and then click Repair your computer.
- Choose Troubleshoot > Advanced options > System Restore.
- Select your Windows 10 to continue.
- Click Next on the System Restore wizard.
- Select the point (date and time) before you deleted the admin account, and click Next.
- Click Finish, and Yes.
- Wait for the System Restore process to complete.
- After the System Restore process is finished, restart Windows 10, and the deleted admin account should now be recovered and available.
- List item
For recovering files, you can also use Windows File Recovery.
The following instructions for using Windows File Recovery are from Recover lost files on Windows 10
If necessary, download and launch the app from Microsoft Store.
Press the Windows key, enter Windows File Recovery in the search box, and then select Windows File Recovery.
When you are prompted to allow the app to make changes to your device, select Yes.
In the Command Prompt window, enter the command in the following format:
winfr source-drive: destination-drive: [/mode] [/switches]
There are 2 basic modes you can use to recover files: Regular and Extensive.
Regular mode examples
Recover your Documents folder from your C: drive to the recovery folder on an E: drive. Don’t forget the backslash () at the end of the folder.
Winfr C: E: /regular /n \Users\<username>\Documents\
Recover PDF and Word files from your C: drive to the recovery folder on an E: drive.
Winfr C: E: /regular /n *.pdf /n *.docx
Extensive mode examples
Recover any file with the string "invoice" in the filename by using wildcard characters.
Winfr E: C: /extensive /n *invoice*
Recover jpeg and png photos from your Pictures folder to the recovery folder on an E: drive.
Winfr C: E: /extensive /n \Users\<username>\Pictures\*.JPEG /n\Users\<username>\Pictures\*.PNG
The source and destination drives must be different. When recovering from the operating system drive (often C: ), use the /n <filter>
switches to specify the user files or folder.
Microsoft automatically creates a recovery folder for you called, Recovery_<date and time>
on the destination drive.
When you are prompted for confirmation to continue, enter Y to start the recovery operation. Depending on the size of your source drive, this may take a while. To stop the recovery process, press Ctrl + C.