I am using Windows 7 64bit
Here is the code snippet I am using to start
@echo off
call "C:\Program Files (x86)\LOLReplay\LOLRecorder.exe"
call "G:\League of Legends\lol.launcher.exe"
exit
But unless I close LOLRecorder.exe it won't start my lol.launcher.exe.... basically I want both running and the cmd prompt exit after they start. Whats wrong here? I checked out another stackoverflow answer Here but it refers to the same method I am using.
EDIT:
With the start command it just starts 2 terminal windows and nothing starts!
@echo off
start "C:\Program Files (x86)\LOLReplay\LOLRecorder.exe"
start "G:\League of Legends\lol.launcher.exe"
exit
Try using the conditional execution & or the && between each command either with a copy and paste into the cmd.exe window or in a batch file. Additionally, you can use the double pipe || symbols instead to only run the next command if the previous command failed.
Click Start, type cmd, and press Enter to open a command prompt window. In the Windows taskbar, right-click the command prompt window icon and select Command Prompt. A second command prompt window is opened.
To open a second window of certain open apps, just hold Shift and click on the icon in your taskbar. For programs like Word, Notepad, File Explorer, and Chrome, this will open a second window with a blank document. You can work in that instance of the app separately from whatever else you already have open.
On the taskbar, select the Task view icon, then select New desktop. Open the apps you want to use on that desktop and then when you want to switch to a different desktop, select Task view again.
With the start command it just starts 2 terminal windows and nothing starts!
The problem is the quotes (which are unfortunately required, due to the spaces in the paths). The start
command doesn't seem to like them.
You can work around this by using the short DOS names for all the directories (and remove quotes), or by specifying the directory separately and quoting it (which the start
command seems to be able to deal with).
Try this:
@echo off
start /d "C:\Program Files (x86)\LOLReplay" LOLRecorder.exe
start /d "G:\League of Legends" lol.launcher.exe
Or, if your batch files become more complicated in the future, or your program names have spaces in them, this:
@ECHO OFF
CALL :MainScript
GOTO :EOF
:MainScript
CALL :RunProgramAsync "C:\Program Files (x86)\LOLReplay\LOLRecorder.exe"
CALL :RunProgramAsync "G:\League of Legends\lol.launcher.exe"
GOTO :EOF
:RunProgramAsync
REM ~sI expands the variable to contain short DOS names only
start %~s1
GOTO :EOF
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With