Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Batch Files not working when trying to open programs

27 Dec 2014   #1
SinRival

Windows 7 Home Premium 64-bit (6.1, Build 7601)
 
 
Batch Files not working when trying to open programs

I was trying to create a batch file to open up two programs which I mostly always start and use when I login and so I attempted to create the batch file following this: Launch Multiple Programs From A Single Shortcut Using A Batch File

While I managed to do all the actual "coding" part of it

When I execute it I get a error message (screenshot in attachments of both errors)

I'm not quite sure why it has those strange letters and I'm just confused in general about why it isn't working.

The two programs are Google Chrome and League of Legends.

Once I had gotten the batch file to work I was going to schedule it to run during start-up so as to save some time in having to wait until I can open it and such.

Can anyone help?




Attached Thumbnails
Batch Files not working when trying to open programs-batch-file-not-working-1.png   Batch Files not working when trying to open programs-batch-file-not-working-2.png  
My System SpecsSystem Spec
.
27 Dec 2014   #2
MilesAhead

Windows 7 32 bit
 
 

Please post the batch file for us to peruse.
My System SpecsSystem Spec
27 Dec 2014   #3
Berton

Windows 7 Ultimate 64-bit, Windows 8.1 64-bit, Mac OS X 10.10, Linux Mint 17, Windows 10 Pro TP
 
 

It might help if you'd Copy the text in the .bat file and post here. Or Attach the .bat file.
My System SpecsSystem Spec
.

27 Dec 2014   #4
SinRival

Windows 7 Home Premium 64-bit (6.1, Build 7601)
 
 

Oh yeah sorry. Here you go


Attached Files
File Type: bat Test.bat (167 Bytes, 15 views)
My System SpecsSystem Spec
28 Dec 2014   #5
SinRival

Windows 7 Home Premium 64-bit (6.1, Build 7601)
 
 

I fixed my problem instead of what I used in the batch file I used this tutorial:

Batch Files - Start Multiple Programs At Once

And did this:

@echo off

rem League of Legends
cd "C:\Riot Games\League of Legends\"
start lol.launcher.exe
rem Chrome
cd "C:\Program Files (x86)\Google\Chrome\Application"
start chrome.exe
exit

Worked exactly.
My System SpecsSystem Spec
28 Dec 2014   #6
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Code:
@echo off
 
start Chrome "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
start League of Legends "C:\Riot Games\League of Legends\lol.launcher.exe"
SinRival, the problem with your above Text.bat is that between 'Chrome' and 'League of Legends' you've somehow managed to type ['LEFT DOUBLE QUOTATION MARK','0x201c'] and ['RIGHT DOUBLE QUOTATION MARK','0x201d'] instead of " ['QUOTATION MARK','0x22'] (normal double quotes).

Eliminating and swapping out the incorrect quotes around the two application names with normal double quotes leaves you with a perfectly working batch file.


PS: Took me for ages to figure out the problem with this one
My System SpecsSystem Spec
29 Dec 2014   #7
MilesAhead

Windows 7 32 bit
 
 

Quote   Quote: Originally Posted by Pyprohly View Post
[CODE]


PS: Took me for ages to figure out the problem with this one
I'm not surprised. I looked at the bat file after reading this post and the quotes sure looked normal. Nice pick up.
My System SpecsSystem Spec
Reply

 Batch Files not working when trying to open programs




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Batch Files - Start Multiple Programs At Once
Batch Files - Start Multiple Programs at Once All of the work done in this tutorial will be done through MS DOS Batch Files. They are simply a method by which to enter multiple commands into a command prompt without manually typing them. Batch files are run through Command Prompt but can be...
Tutorials
Making the 'edit' option on batch files open in notepad++
Hello, Tonight it seems like I have really got myself into a pickle. As the title says I tried to change the default editor for batch files. I dinked around in the registry a bit, and I now have myself this. Any suggestions to actually making it work? http://i.imgur.com/3sqng8H.png Thanks...
General Discussion
Nothing will open (programs, files, etc..)
Alright so last night I was using my computer just like I have been for the past 2 years. Today when I turned it on, I tried to open chrome but it wouldn't work. I tried and tried and restarted my computer many times but It never worked. Then I realizes nothing would open. When I did Ctrl alt...
General Discussion
Batch files not opening some programs
Ohai. It's been a while since I've been here. Didn't help that I'd forgotten my username and password. Anyway, recently I decided to start using batch files to open programs when I want to run several in one go, rather than running all of them at startup. Should save some time if I ever want to...
General Discussion
Can not open programs/.exe files
I ran Avast to see if I had any problems with my computer (I hadn't checked in a while, wasn't exeriencing any problems though.) It said something about restarting/next startup after it had finished scanning and I clicked "chest"? (is that what it's called). I turned off my laptop and went to...
General Discussion
Open Multiple Files one click - simple bat/batch file
Hey, I have a simple batch file to load multiple files with one click, but it's not working. When I run it, it simply very quickly pops up the cmd dialog, which quickly disappears, and nothing is loaded. I've tried 'running as administrator' - same problem. File is xxxxx.bat
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 15:33.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App