Skip to content
Home » Windows » System restore from command prompt

System restore from command prompt

Sometimes a Windows computer is so broken that you have to run system restore from the command prompt. If you’re reading this, I don’t have to elaborate. This works in Windows 7, Windows 10, and any other recent version.

And when a system is that broken, you can expect to run into a couple of snags. Maybe you can’t even get a command prompt. Or maybe you got a command prompt but the executable file is buried. Here’s how to solve those two problems.

Getting a command prompt

The first thing you have to do is get a command prompt running. First try the usual ways. My favorite is to just hit the Windows key+R, type cmd.exe, and hit enter. If that worked, you can skip the next couple of paragraphs.

But if the system is broken to the point where that doesn’t work, you still have two options. See if you can bring up task manager from either CTRL-ALT-DEL or hitting SHIFT-CTRL-ESC, then navigate to File, Run, and type cmd.exe. If that doesn’t work either, you can try the Sticky Keys hack. That trick is reliable but it’s more effort. If you follow that tactic, come back here after you reboot and hit the shift key five times.

You’ll be glad to know getting the command prompt is usually the hard part.

System restore from command prompt

system restore from command prompt

This non-obvious command usually gets system restore running from the command prompt. But it doesn’t hurt to try the shorter and simpler rstrui.exe first.

From the command prompt, type rstrui.exe and see if it runs. Depending on the version of Windows you’re running, sometimes it’s that simple. That works on my Windows 7 and Windows 10 systems.

If that didn’t work for you, try a couple of variations of it. First, try the more reliable %systemroot%\system32\restore\rstrui.exe and hit enter.

If that didn’t work either, run the following two commands:

cd %systemroot%
dir /s rstrui.exe

system restore from command prompt when it's tricky

If the system restore executable isn’t in the usual hiding places, try this to find it. Type the path I boxed in with red, then \ then rstrui.exe to run it.

The output will look like the image to the right. You’ll probably find a couple of candidates. Look for a file that’s more than 200,000 bytes in length and note its location, then type the full file path. Usually the first one in the list is the one you want. You can retype the full path, or you can copy and paste from the window.

system restore

Now system restore is running in its normal state.

And then, when all goes well, the familiar System Restore wizard will come up and allow you to restore your system to a known-good state. At this point, you just need to click Next and follow the prompts. The hard part is over.

So those are the secrets to getting System Restore to run from a command prompt.

If you found this post informative or helpful, please share it!
%d bloggers like this: