DEV Community

Cover image for Automate working environment startup
hatati
hatati

Posted on

Automate working environment startup

Why?

It's 8 am and the working day has begun. You turn on your computer, open your mail program, open teams/skype, open your Notes, open your favorite IDE, open a text editor, and open terminals to different repos. You decide to grab a quick coffee, meanwhile, your colleague asks for help on a project, and you tell them you'll be right there as soon as your computer is ready. You open the browser and all the tabs that you need. The time registration software also needs to start. The boss asks about the progress on the crucial task he assigned you and you tell him that you'll get on it in a minute. You open up the company's issue tracker system and now you are finally ready to start working, and it's only 9 am! You go to help your colleague, but he says he is busy with meetings and that you can look at it together over lunch. Your boss asks why you are not at your desk and gives you are warning for slacking off at a crucial time for the company. You go back to your desk and can't wait to go home.

Exaggeration? Yes. But while we can't easily automate the morning coffee we can automate our working environment.

How?

Here's how to make your windows laptop automatically open Google Chrome, Outlook, Notepad++, a VS Code workspace, and a windows terminal with 2 tabs:

  1. Press Win + r and type shell:startup. This opens up the C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. Shortcuts and scripts in this folder will be executed at startup.
  2. Copy shortcuts for Google Chrome, Outlook, and Notepad++ into the startup folder
  3. Create a Startup.bat batch script that will open the terminal and VS Code Workspace and put it in the startup folder. Here's the code for this example:
start wt -d C:\temp\project1 ; new-tab -d C:\temp\project2
code C:\temp\test-workspace.code-workspace
exit
Enter fullscreen mode Exit fullscreen mode

The Startup folder now looks like this:
The Startup folder

On the next windows startup, all the files in the Startup folder will be executed automatically, making you ready to work immediately. By using batch files you can customize the startup process to fit your needs exactly:
Windows Startup

Note:

A lot of application comes prebuilt with a Run on startup feature that you should prefer instead of using the Startup folder. You can see a list of all the applications that come with this feature under Settings -> Apps -> Startup

Top comments (0)