Is it possible to enable System Protection from the command prompt?

9

7

I just tried to install some updates for my laptop, and now it is stuck in an automatic repair loop. From what I've been able to find so far in the logs, I believe it is some problem with the registry.

The system restore tells me that there are multiple restore points available, including one it created just before attempting to install the updates. However, it tells me that I can't restore my C: drive because "You must enable system protection on this drive".

Is there a way that I can enable system protection on my drive through the command prompt? Failing that, is there a way to restore just the registry (either manually or automatically)? I've been able to open up regedit, though I have no clue what part of the registry is corrupted.

Update:

Here's the only relevant thing the SrtTrail.txt log has to say about the issue:

Root cause fount:
---------------------------
Registry is corrupt.

Repair action: System Restore
Result: Failed. Error code = 0x1f
Time taken = 588875 ms

Repair action: Registry roll back
Result: Failed. Error code = 0x3
Time taken = 0 ms

Update 2:

I booted using the legacy boot and managed to surface a new error:

Realtek PCle FE Family Controller Series v1.27 (10/31/11)
PXE-E61: Media test failure, check cable

Looks like this is a red herring. This just means that I can't boot from the network.

Rob Watts

Posted 2015-01-06T06:55:02.270

Reputation: 413

Do you have a backup of registry? Did you faced any power down/system shutdown during the installation of updates? – Renju Chandran chingath – 2015-01-06T07:09:51.030

@RenjuChandranchingath I assume the restore point includes a backup of the registry, but I don't have any backup separate from that. – Rob Watts – 2015-01-06T07:11:24.663

@RenjuChandranchingath And no, the system was fine (no power down or shutdown) until I rebooted to install updates – Rob Watts – 2015-01-06T07:13:35.203

From a powershell type enable-computerrestore -drive "C:\". – Renju Chandran chingath – 2015-01-06T07:25:27.293

@RenjuChandranchingath Do you know how to start the powershell from the command prompt? – Rob Watts – 2015-01-06T07:30:23.027

type powershell in command prompt – Renju Chandran chingath – 2015-01-06T07:39:39.667

@RenjuChandranchingath I tried that - it's giving me the "not recognized" message – Rob Watts – 2015-01-06T07:40:58.190

type rstrui.exe in command prompt. Please let me know whether you are getting a system restore window. – Renju Chandran chingath – 2015-01-08T04:24:30.643

@RenjuChandranchingath Yes, I get the restore window. I just found something that said to use /offline:C:\windows=active as an argument to rstrui.exe, and that seems to be helpful – Rob Watts – 2015-01-08T05:24:25.937

Answers

21

Looking at a an article for Windows 7 about the same issue, I found a suggestion to use the following command:

Rstrui.exe /offline:C:\windows=active

Rstrui.exe opens up the system restore window. I'm not sure what the argument means, but it made it so I could actually use the restore points! Yay!

Unfortunately, this did not completely fix my problem - the system restore failed. The error message implied that it had something to do with the registry. So, using the command prompt I went into C:\Windows\System32\config and renamed two of the registry files:

ren SYSTEM system.001
ren SOFTWARE software.001

After doing this, I ran the system restore again (using the same argument as I did the first time) and it worked! I was able to log back into my computer!

Rob Watts

Posted 2015-01-06T06:55:02.270

Reputation: 413

I can’t believe it but this worked for me as well. It even threw fricking errors and said restoration failed, but it still was able to boot correctly and when logged in it said it did succeed. – Danail Gabenski – 2017-10-31T04:12:12.320

For me also worked loading of software registry hive . – Alex78191 – 2019-03-27T23:23:00.603

I guess that rstrui /offline:c is enough. – Alex78191 – 2019-03-27T23:35:28.487

1Thanks! It also worked for me. – Dmitry Nichiporenko – 2019-09-14T22:22:09.590