in the general settings configuration, one of the options allows you to set a command that is run on frontend exit. plug in whatever the window command is for shutting down here. The command should be somethin like:
cmd /c shutdown /p
although I don't know for sure a I haven't tried this on windows recently
cheers