Skip to main content

Launch multiple programs with one shortcut in Windows Operating System

 

Yes...!! you heard is right 😊and it’s possible with simple coded steps.

When we’re getting into a Daily work, we’ve to deal with many Tools, Editors, Folders and Files. Opening of all these on daily basis is a tedious job 😖.

In My Scenario, daily I’ve to open multiple chrome browsers, project folders, files and visual studio to continue my regular project tasks. To mitigate this, I am bringing up this article for you


Just by writing simple coded steps in a Notepad/any editor to overcome this.

Write below code in notepad and click on File->Save As -> Give your name followed by .bat extension and click on OK button. Now your shortcut key is ready. Just double click it and have fun with it.

Below is the code:

@echo off

:: Open folders

start %USERPROFILE%\Documents\

start %USERPROFILE%\Desktop\Test\

:: Open files

start "" "%USERPROFILE%\Desktop\DeskTop\SM\test.txt"

::Open browser

start chrome.exe

start " " https://www.freecodecamp.org/learn/

exit


Let’s Understand this code line by line

@echo off – is a command that disable the echoing or displaying on the screen and suppresses echoing for the terminal attached to a specified process.

Exit – to exit from program, act as a break line in coding

::Open Folders  - it opens respective folders based on paths given. Here it’ll open Documents Folder

start %USERPROFILE%\Documents\

You’ve to specify your folder name and its relevant path  in above command like given as Documents\

 

:: Open files - it opens respective files based on paths given. Here it’ll open test.txt file from SM Folder. Remember we’ve to provide path including .extension of the file (like .xls, .exe)

start "" "%USERPROFILE%\Desktop\Desktop\SM\test.txt"

You’ve to specify your file name with extension(.txt)  in above command like given as test.txt

 

::Open browser - it opens chrome browser and opens given url. If you’ve not given chrome.exe, given URL opens in a Default browser

start chrome.exe

start " " http://knowhowtechgeek.blogspot.com/


If you’re not able to find exact paths of your files, folders, browsers and other tools.

Follow Below

Step 1: Open the Start menu and go to All apps to find the first program you want to open in your batch. Right-click on the program and click Open file location.

Step 2: A File Explorer window will open to the program's location. Right-click on the program in the File Explorer window and click Properties.

Step 3: In the Properties window, click the Shortcut tab. Find Target: field, select the text in the textbox, and copy it. And use in your batch scripts

Step 4: Repeat steps 1 through 3 for the second (and third, and fourth) program(s) you want to open in this shortcut.


Comments

Popular posts from this blog

Variables, Data Types and Math Operations

  In order to do anything interesting in a program, we must have the ability to store and manipulate values. What allows us to do that are what we call variables. Now a variable, simply put, is just named data storage. Now Java is a strongly ‑ typed language. Now what that means is that when we declare a variable like, in this case, we have a variable named data Value, we have to specify the type of that variable, in this case, it's what we call an int, something that can store integers. So, what that means is that the data Value variable can only store things that are compatible with the type int. As we go through the course, we'll talk about this idea of one type being compatible with another. Now when we declare a variable, we can, of course, then assign a value to it, so our variable data Value now holds the value 100. Now when we use variables, we can do it the way we've done here where we declare it, then assign it, or as a matter of convenience, we can declare them a...

JRE vs. JDK

  The JRE and the JDK are two terms you hear people mention very frequently in the Java world, and what they are the two parts that we need in order to run and create Java applications. The JRE is the Java Runtime Environment. JDK is the Java Development Kit. And so, the JRE is what you require in order to run Java applications, and end users normally install the JRE. They're the ones who are going to run our apps. The JDK provides the tools that we need to create Java apps. So, normally, developers are the ones who install the JDK on their machines. And in order to develop apps, you need to run them, so the JDK installation includes a JRE. So how does all this work together? If we sit down, and we type up a Java source file with our program code inside of it, and we want to go ahead and run that in some host environment, how do we do it? A host environment might be Windows, Linux. It could be Mac. It could even be a browser. It might be a phone running Android. How do we get from ...

Publish a Project

Publish a Project: Publishing means packaging/archiving the project. Why to Publish : Robot can execute only Packages, doesn’t run projects directly. So we need to archive all project files to a Single Package file. There are 2 Process are available 1.        If Orchestrator is connected through Robot, automatically Project archive file displayed in Packages folder. From here, we can distribute this to some other Robots 2.        If there is no connection between Orchestrator and Robot, we need place Project archive file in Packages folder manually How to Publish: 1.        Open UI Studio, Create New Project 2.        In the Setup ribbon tab, click Publish . If the project is published successfully, the Info dialog box is displayed and the project is copied to the NuGet location set in the NuGetServerUrl parameter, in the UiPath.settings...