Synchronous command to restart pc

0

In my Windows Embedded 7 Standard installation, I'm setting an environment variable using the synchronous command

REG ADD "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Environment" /v Name /t REG_SZ /d "Data"

As I have read, I can't access this variable until the next restart of my system. I tried to restart using the following command (I found it here)

cmd /c shutdown /r /f /t 75

This did not work for me. (Also calling the command via the regular Cmd.exe-Window is working.)

Is there any way to restart a Windows Embedded 7 Standard OS using synchronous commands? (Or maybe there are other solutions to the problem of accessing the environment variable?)

Thank you in advance for your answer!

DIF

Posted 2012-06-06T07:52:23.267

Reputation: 185

Answers

0

After some struggle, it eventually worked by copying the line SHUTDOWN /r /f /t 30 to a batch file and executing the file via a synchronous command. I don't know, why it would not work by just running the line directly...

DIF

Posted 2012-06-06T07:52:23.267

Reputation: 185

0

As I remember the command in cmd.exe was like this: shutdown -s -r -t 30 It will restart your computer after 30 Seconds and you should run it with administrator privileges.

Hamed JML

Posted 2012-06-06T07:52:23.267

Reputation: 387