Posts Tagged ‘batch’

Cancellable startup script for Windows

August 12, 2011

Tired of starting all the programs you need after booting your computer day by day? Yay, just create shortcuts to all of them in the Startup directory, Windows will take care of starting them.

So well, works fine… as long as everything else is fine. For most people in IT, it is just a matter of time until there is a more or less urgent emergency to be fixed ASAP (e.g. fixing a web application that has crashed). Here you go: Argh, just wanted to connect to the server and fix the problem, but the computer is more or less unresponsive due to 20 programs starting at the same time. Sorry users, you will have to wait some minutes until my computer decides to be cooperative again. It would be great if one could avoid auto starting if needed.

Batch script to the rescue: The following script waits about 10 seconds before it begins to start the programs, giving you an option to cancel it.

Put the following batch script anywhere on your computer, create a new folder personal-autostart next to it, and put shortcuts to any programs you want to automatically startup with Windows into this folder. Then just add a shortcut to the batch script to the windows startup directory.


@Echo off
echo Personal startup script - hit Strg+C to cancel
echo ##############################################
echo Will start in about 10 seconds:
for %%i in ("personal-autostart\*") do echo %%i
echo ##############################################
echo Personal startup script - hit Strg+C to cancel

@ping 127.0.0.1 -n 10 -w 1000 > nul
for %%i in ("personal-autostart\*") do "%%i"

Advertisements