IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> BAT file for closing / restarting Windows 7 with additional pre-task, Shortcut for waking up hard drive and system closure at the same time
Zerow
post Nov 20 2017, 21:50
Post #1


Member


Group: Full Members
Posts: 721
Joined: 31-January 15
From: East of Eurolandia
Member No.: 20375
Mp3tag Version: 2.86



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]
Go to the top of the page
 
+Quote Post
ohrenkino
post Dec 4 2017, 19:58
Post #2


Member


Group: Full Members
Posts: 9465
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.85k



ZITAT(Zerow @ Nov 20 2017, 21:50) *
...
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?
...

You could write a plain text file with the commands to change to a particular drive and show the files on it
like
QUELLTEXT
c:
dir
d:
dir
e:
dir
shutdown -s -f

the shutdown command has the switches to shutdown the local pc and force the closing of all applications.

Edit: unless you already know this, I would like to bring your attention the problem of machines that could in a way anticipate the actions of the humans. This excerpt is from "The Hitchhiker's Guide to the Galaxy" by Douglas Adams:

" SIRIUS CYBERNETICS CORPORATION

Elevators: Modern elevators are strange and complex entities. The ancient electric winch and "maximum-capacity-eight-persons" jobs bear as much relation to a Sirius Cybernetics Corporation Happy Vertical People Transporter as a packet of mixed nuts does to the entire west wing of the Sirian State Mental Hospital.

This is because they operate on the curious principle of "defocused temporal perception." In other words they have the capacity to see dimly into the immediate future, which enables the elevator to be on the right floor to pick you up even before you knew you wanted it, thus eliminating all the tedious chatting, relaxing and making friends that people were previously forced to do while waiting for elevators.

Not unnaturally, many elevators imbued with intelligence and precognition became terribly frustrated with the mindless business of going up and down, up and down, experimented briefly with the notion of going sideways, as a sort of existential protest demanded participation in the decision-making process and finally took to squatting in basements sulking.

An impoverished hitchhiker visiting any planets in the Sirius star system these days can pick up easy money working as a counselor for neurotic elevators."

Wouldn't it be an absolute shame to have a sulking computer only because it should have had the foresight to start the harddisk earlier?
No, this was no serious question. I hope you enjoyed the text.

This post has been edited by ohrenkino: Dec 9 2017, 19:42


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post
Zerow
post Jan 16 2018, 18:01
Post #3


Member


Group: Full Members
Posts: 721
Joined: 31-January 15
From: East of Eurolandia
Member No.: 20375
Mp3tag Version: 2.86



QUOTE (ohrenkino @ Dec 4 2017, 19:58) *
You could write a plain text file with the commands to change to a particular drive and show the files on it
like
CODE
c:
dir
d:
dir
e:
dir
shutdown -s -f

the shutdown command has the switches to shutdown the local pc and force the closing of all applications.

So a BAT file like this
CODE
X:
dir
shutdown -s -f
seems to be neat solution, right?

Unfortunately it first spits out a window popup saying "Windows will shut down is less than a minute", then [even with almost all of my software already closed] shuts down the system for about 30 seconds, goes to the "Shutting down..." screen for another 15 seconds- and only then start to spin the drive X. I seems that it simply takes from memory what was on the list of main folder on drive X and thus skips the turning on the drive part [because the list is created from memory]. So in the end this solution takes whooping 100 seconds to close the system- not really doing what it should [immediately start to spin drives] while taking around 5 times more time than when I do this the old manual way

And if tell it to be more specific and go deeper, to list content if some sub-folders of drive X, then it really starts from creating such list. Unfortunately it stops at it- for 15 seconds needed for the spinning to start. And so the "Windows will shut down is less than a minute" pops up after 15 second. In the end, the whole process takes 60 seconds. Which is an improvement, but not enough of

So now I got to a a version where I first tell it to shut the hell up and then make the damn list
CODE
shutdown -s -f
X:\some folder\some sub-folder\content folder
dir
It takes now 45 seconds. An again- it is and improvement, but not enough as I can do it much quicker manually. But as it is to serve as a closer and not reboot, I can use that code


But how about a reboot- what is a code for that? Maybe a reboot will be somehow done quicker that the closing?

And maybe they are alternative ways / commands of closing the system [and turning of the hardware as I do not want to put it in some hibernation mode]?


QUOTE (ohrenkino @ Dec 4 2017, 19:58) *
[...]
Not unnaturally, many elevators imbued with intelligence and precognition became terribly frustrated with the mindless business of going up and down, up and down, experimented briefly with the notion of going sideways, as a
[...]
And now I know where the jokes of elevators moving sideways comes from; a very well know joke in my country, coming out from a popular comedy
Go to the top of the page
 
+Quote Post
ohrenkino
post Jan 16 2018, 19:35
Post #4


Member


Group: Full Members
Posts: 9465
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.85k



the command
shutdown /?
will show you a number of options - probably also an immediate mode (I think it is /p).
This was just a suggestion.

This post has been edited by ohrenkino: Jan 16 2018, 19:36


--------------------
42 - wie war die Frage / what was the question / quelle était la question
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th January 2018 - 14:26