Automated 3-Tab Browser Launcher (.bat Script)
Build a real-world Windows batch file that automatically opens Google Search, YouTube, and Gmail in your default web browser with a single double-click.
start <URL>timeout /t 2Interactive Batch Script Simulator & Live Tab Preview
Test the batch script directly in the simulated Windows terminal and watch the browser tabs activate.
Click "Run in Simulator" to watch the batch script execute.
No active browser tabs open yet.
Run the batch script above to open Google, YouTube, and Gmail tabs.
Step-by-Step Guide: How to Create and Run on πͺ Windows 11
Follow these simple steps on your PC to create your own double-clickable automation script.
Open Notepad
Press β Win + R, type notepad, and press Enter.
Paste the Script
Copy the batch code above and paste it into your blank Notepad window.
Save with .bat Extension
Click File > Save As..., choose All Files (*.*), and name it workspace.bat.
Double-Click to Run!
Double-click workspace.bat on your Desktop. All 3 tabs will open in your default browser!
Anatomy of Batch Commands Used in this Project
Understanding why each line is needed in production-grade batch scripts.
@echo offBy default, the Windows Command Prompt prints every line of code to the screen before running it. Adding @echo off hides the code execution and only displays clean output messages.
start https://www.google.comThe start command tells Windows to open the target URL using the systemβs default web browser (Google Chrome, Microsoft Edge, Firefox, or Brave).
timeout /t 2 >nulPauses script execution for 2 seconds. The >nul redirection silences the default countdown message (Waiting for 2 seconds...), giving your browser time to open each tab cleanly without congestion.
pause & exitpause keeps the terminal window open until you press any key so you can read the status logs. exit cleanly terminates the Command Prompt process.
Bonus Automation: Launch Every Morning at 9:00 AM!
Use πͺ Windows 11 Task Scheduler to automate this script daily.
- Press β Win + S and search for Task Scheduler.
- Click Create Basic Task... on the right action panel.
- Name it
Open Morning Workspace Tabsand click Next. - Trigger: Choose When I log on or Daily at 9:00 AM.
- Action: Choose Start a program and browse to your saved
workspace.batfile. - Click Finish! Your tabs will open automatically every day when you turn on your PC.
Knowledge Check: Batch Scripting
β Which command in a Windows Batch file is used to open a website URL in the user's default browser?