Restart the PC via the command prompt

GLX20 Posted messages 3 Status Membre -  
brucine Posted messages 24390 Registration date   Status Membre Last intervention   -

Hello,

I would like to restart my computer in the command prompt with the command "Shutdown /r".

But the following message appears: "Shutdown" is not recognized as an internal or external command, an executable program, or a batch file.

How can I restart or shut down the PC in this case?

Knowing that I am in the command prompt opened from WinRE.

Thank you in advance

6 réponses

brucine Posted messages 24390 Registration date   Status Membre Last intervention   4 098
 

Good evening,

That's a good question, I’ve never thought about whether the SHUTDOWN command is available in the WinRE environment, but in principle, if WinRE is running (from an external media?), it means Windows is not running.

Try, just in case, shutdown /r /m \\ComputerName or launch shutdown from the target PC, assuming it is indeed named C: under WinRE, to be verified via CD /D C:\Windows\System32

0
fabul Posted messages 42093 Registration date   Status Modérateur Last intervention   6 032
 

Hello,

The normal command

c:\windows\system32\shutdown -s -f -t 00

0
brucine Posted messages 24390 Registration date   Status Membre Last intervention   4 098
 

Hello,

No, it's not about turning it off but about restarting it (and "t" is optional when it's null).

0
fabul Posted messages 42093 Registration date   Status Modérateur Last intervention   6 032 > brucine Posted messages 24390 Registration date   Status Membre Last intervention  
 

Edit: c:\windows\system32\shutdown -r -f to restart

If you don't include -t 00 it will restart in 1 minute instead of immediately

0
GLX20 Posted messages 3 Status Membre
 

Thank you for your replies.

The problem is that Shutdown is not recognized as a command, as indicated by the message.

So none of these possibilities work...

0
fabul Posted messages 42093 Registration date   Status Modérateur Last intervention   6 032
 

If you pressed the Power button for 5 seconds, it would expand.

But I know, you're trying to understand, so am I.

If you tried x:\ instead of c:\

0
GLX20 Posted messages 3 Status Membre
 

Exactly, it starts with X:\windows\system32 and not C:\

0
fabul Posted messages 42093 Registration date   Status Modérateur Last intervention   6 032
 

CD c:\windows\system32
shutdown -r -f -t 00

0
brucine Posted messages 24390 Registration date   Status Membre Last intervention   4 098
 

Hello,

The question is not about the syntax of the command; the one in the original message is correct, even if I suggested trying, as mentioned in <1>, albeit without much hope, to see WinRE address a drive with a different letter or to consider this drive (the Windows disk) as another PC.

The point is that WinRE does not include shutdown itself and that, as I also pointed out in <1>, if WinRE is launched, it means that Windows is not running, making it impossible to close what is not open or even to access the DOS commands emulated by Windows.

The secondary question is why WinRE (which should not be confused with specific operational Windows versions, such as IoT) is launched and why we would want to use it to shut down or restart the computer.

1