Batch Files not working when trying to open programs


  1. Posts : 112
    Windows 7 Home Premium 64-bit (6.1, Build 7601)
       #1

    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 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 Computer


  2. Posts : 5,092
    Windows 7 32 bit
       #2

    Please post the batch file for us to peruse.
      My Computer


  3. Posts : 1,519
    Windows 7 Ultimate 64-bit, Windows 8.1 64-bit, Mac OS X 10.10, Linux Mint 17, Windows 10 Pro TP
       #3

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


  4. Posts : 112
    Windows 7 Home Premium 64-bit (6.1, Build 7601)
    Thread Starter
       #4

    Oh yeah sorry. Here you go :)
    Batch Files not working when trying to open programs Attached Files
      My Computer


  5. Posts : 112
    Windows 7 Home Premium 64-bit (6.1, Build 7601)
    Thread Starter
       #5

    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 Computer


  6. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #6

    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 Computer


  7. Posts : 5,092
    Windows 7 32 bit
       #7

    Pyprohly said:
    [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 Computer


 

  Related Discussions
Our Sites
Site Links
About 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 06:13.
Find Us