It can be done (without reinstall and without system restore).
You have at least three options, and the third is the easiest way to do it. But certainly not the only way.
- Restore from a backup.
- Use the backup to recover the old permission information.
- Reinstall windows.
1 Restore from a backup.
This obviously requires you to have a backup of your laptop. Since you posted here on [SU] I assume that this is not the case. In which case it is a hard learned lesson.
2 Use information
Either from a backup from your laptop or from another laptop.
If the harddisk is not encrypted then you can easily access it while booted from something else. E.g. from a windows iso on an USB pendrive using shiftF10. At this point you can use cacls
to change the permissions.
Alternatively replace sethc.exe with cmd.exe. Then reboot and at the log in screen press Shift five times. This will open a command prompt with a NT authority token which you can use to issue those cacls commands.
Recovering access to the C: volume should be easy. The harder part is to set all permissions correctly. This is what you need the backup for. You want to list all permissions from the backup, place them in a file and modify that to issue relevant commands. Similar things have been done before, and there are several question on stack exchange where people did the same in a unix environment. A similar approach should also work for windows.
(Linux examples which should give you an idea on how to do this:
3 Reinstall
Well duh. Hopefully just a windows re-installation. With luck all important data can remain on D: (If you do not have a second volume yet then this is the time to consider an OS and a data partition.