FIX FOR WINDOWS BATCH FILE THAT DOES NOT CONTINUE LAUNCHING
September 9, 2016 / by Marco / Categories : Software, Technology, TIP AND TRICKS, Windows
Windows batch files are great for basic automation, especially if you add it to your Windows Startup. However, I just ran into a problem with executing multiple commands in a batch file – they would not continue and just pause until the program is exited.
Here is an example of the original batch file:
@echo off echo ------------------------------------------------ echo - Launching Link by Business Legions - echo ------------------------------------------------ timeout /t 10 /nobreak "C:\website.lnk" exit
The batch file simply waits for 10 seconds before opening up a shortcut link which points to a particular website. Chrome is used to open up the website.
The additional requirements was to wait for 5 minutes and then close the website and open another.
So I thought the commands would be this:
@echo off echo ------------------------------------------------ echo - Launching Link by Business Legions - echo ------------------------------------------------ timeout /t 10 /nobreak "C:\website.lnk" timeout /t 600 /nobreak taskkill /f /im chrome.exe "C:\website2.lnk" exit
The problem with the above batch file was it would just get stuck when the website opens up. If you closed the browser then it would continue. After searching around for the best possible solution I figured out that all I needed to use was the following command:
start “” “C:\website.lnk”
It is important to make sure you have “” after start because this refers to the TITLE of the window so if you don’t have this, the link won’t open.
Finally, the working solution with all the commands used in the batch file is below:
@echo off echo ------------------------------------------------ echo - Launching Link by Business Legions - echo ------------------------------------------------ timeout /t 10 /nobreak start "" "C:\website.lnk" timeout /t 600 /nobreak taskkill /f /im chrome.exe start "" "C:\website2.lnk" exit
 If you need any help with this leave me a comment and I’ll try my best to help.
If you need any help with this leave me a comment and I’ll try my best to help.
OTHER ARTICLES YOU MAY LIKE
 
CHATGPT USEFUL FEATURE: TEMPORARY CHAT
Everyday use of ChatGPT naturally trains you to think in threads. You ask a question, you get an answer, you refine the prompt, and the conversation accretes context. It’s one of the reasons ChatGPT feels more like a companion than a search box: it remembers what you said so it can respond appropriately next time […]
read more 
HOW TO GET FREE UPGRADE TO PERPLEXITY.AI PRO FOR 12 MONTHS AND TESTING PRO FEATURES
If you spend time researching, comparing, or synthesising information online, you have probably encountered Perplexity.ai — a research-focused assistant that blends large language models with live web search and citation trails. The Pro plan supercharges that experience with priority access to powerful models, higher usage limits, and premium capabilities baked directly into the interface. Right […]
read more 

