# BAT file for closing / restarting Windows 7 with additional pre-task

**URL:** https://community.mp3tag.de/t/bat-file-for-closing-restarting-windows-7-with-additional-pre-task/19546
**Category:** Off-Topic
**Created:** [November 20, 2017, 7:50pm UTC](https://community.mp3tag.de/t/bat-file-for-closing-restarting-windows-7-with-additional-pre-task/19546 "2017-11-20T19:50:43Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)
#### Post date: [November 20, 2017, 7:50pm UTC](https://community.mp3tag.de/t/bat-file-for-closing-restarting-windows-7-with-additional-pre-task/19546/1 "2017-11-20T19:50:43Z")

</div>

I have this problem: I tell my Windows 7 x64 to shut down or restart using the buttons in the Start Menu- and it does it. But first it does of course a bunch of things that take time [which are things that I did not implemented, just the default system behavior]; and apparently only after them it accesses all of the hard drives for check up or something. And as I have my archive drive set to turn off after 5 minutes of idle work, my reboot time is most of the time far much longer than it should- I can hear the HDD starting to spin, just so that Windows can finish the closing procedure. And if I want to avoid this I need to access my archive drive and go into some sub-folder that was in a folder I have accessed during my workflow [so that something new is opened and the drive has to wake up to execute this access from the drive itself and not from the RAM]

[And the reason I turn of the archive HDD is elimination of noise, some heat reduction, prevention of hardware wear and data corruptions, reduction of power consumption]

So does anyone know how to write a BAT file that would start at the same time execution of waking up of drive X and the rebooting of the system; and the alternative version that would start waking up drive X and also start turning off the whole computer, not waiting for the drive to start spinning with the full speed?

Apparently nobody in Microsoft had the foresight to imagine, that someone can have a turned off drive, that should be accessed at the beginning of the system closure and not at the end of it; despite the fact, that there is an option in Windows for turning off all of the idle drives. But come to think of it, it all makes typical Microsoft non-sense; because Windows allows for turning on that option only for all of the drives at once or for none at all [and so I have to use a third party software that turns off only that archive drive]

---

_[View the full topic](https://community.mp3tag.de/t/bat-file-for-closing-restarting-windows-7-with-additional-pre-task/19546)._
