Menu

#18 Scripts/commands with shutdown

2.10.2
wont-fix
nobody
Scripts (1)
5
2014-10-13
2014-05-28
No

I would love to have the ability to run a script/cmd command on the machine I am shutting down.

As per example, I am running an app that I would prefer to shut down gracefully. Usually I just run a batch file that shuts every part of it down elegantly.

It would be advantageous to be able to send the shutdown command (I believe you use some version of "shutdown -s -tx") preceded with a command like "C:\run this on shutdown.bat".

Discussion

  • BasilDane

    BasilDane - 2014-05-28

    We do not call shutdown.exe. WOL uses the Windows API to remotely shutdown, hibernate, or sleep computers. You can override this behavior by putting a command in the shutdown command box on the properties page, in which case it will run your command only.

    However, when you use WOL to do a shutdown, if you do NOT check "force", then it does gracefully close applications on the remote computer. I don't recall the exact timing, but I think windows sends a "we are shutting down" message to all open applications, and gives them 30 seconds to close. Then Windows shuts down. If an application does not respond in that time period, then it may be forcibly closed without saving changes.

    In other words, it should work the way you are asking right out of the box with no changes needed.

     
  • BasilDane

    BasilDane - 2014-10-13

    I believe we provide this functionality with the "shutdown" field. You can run powershell or other scripts from that field. Therefore closing this request.

     
  • BasilDane

    BasilDane - 2014-10-13
    • status: open --> wont-fix
     

Log in to post a comment.