Tiny tips: Automate your environment

This is one of the “Tiny tips” series.
The purpose is to share little pieces of helpful practices and tricks that will make your work better and more pleasant.
Take a look at the other tiny tips like Use cheat sheets.

You know the feeling when your machine needs to be restarted and then you have to run all your programs again.
Or when you come back from a holiday. Or some updates that need to happen. Or something else which needs the reset of the current state of your environment.

You can actually do something about that annoying process and automatically run everything you need.

First, create a batch file (.bat for Windows or shell script (.sh) for MAC OX and Linux) in some easily accessible place.

Then include in the script all of the programs you want to run at once, like so:

@echo off

	:: Open a particular solution 
	start C:\Projects\Other\Playground\Playground.sln
	
	:: Open other programs like Outlook, Notepad, etc.
	start outlook
	start notepad++
	
	:: SQL Server Management Studio
	start ssms
	
	:: Open Chrome and browse some useful pages
	start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" https://stackoverflow.com/
	start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" https://paircoders.com/
	
	:: You can even update your local Git repo with the latest changes
	cd C:\Projects\GIT\KOCreate && git.exe pull
	
@echo on

Finally, run the batch and let it do the job.

2 thoughts on “Tiny tips: Automate your environment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s