automate

Windows batch: automating start of day

I read someone on twitter stating that their resolution was to automate repetitive tasks. This is not my resolution, but I thought it was an excellent idea.

One task that I do every time I turn on the computer is opening 4 essential programs. This takes a few minutes. It is boring. I need to open IE, Fireforx, pidgin, and skype. I have task buttons for IE and Fireforx, and Pigdin can be found on the top of my start menu. Skype will rise and fall depending on how recent the last update was. The last two are the reason why the process can delay a bit.

So I wrote this simple batch file to open them all. The script switches to the directory of the program and starts it in the background. In bash we would use & to push the process to the background; in windows it is using the command "start". Then I created a shortcut that I dropped on the desktop. And I was finished.

Now the whole process takes around 30 seconds with a single double click.

set originalPath= %CD%
 
cd "C:\Program Files\Mozilla Firefox"
start firefox.exe
 
cd "C:\Program Files\Internet Explorer\"
start iexplore.exe
 
cd"C:\Program Files\Pidgin"
start pidgin.exe
 
cd "C:\Program Files\Skype\Phone"
start skype.exe
 
cd %originalPath%
echo End of Script

Syndicate content