none
Synchronous command to restart pc RRS feed

  • Question

  • Hi!

    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!

    Birgit


    Wednesday, June 6, 2012 9:12 AM

Answers

  • you don't need cmd /c

    just:
    shutdown -r -f

    why 75sec delay?

    check if shutdown.exe is included in your image.
    Otherwise search in ICE for shutdown.exe and add the package.


    Windows Embedded Developer and Scripting Guy //Germany (Preparing a blog about Windows Embedded Standard)

    Wednesday, June 6, 2012 11:36 AM