RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Emulation Station - Launch windows game + additional exe

    Scheduled Pinned Locked Moved Help and Support
    multiple-exe
    11 Posts 4 Posters 10.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      makaveeti
      last edited by

      Hey guys,

      I'm struggling to find a way to do this effectively.

      I'm trying to launch streets of rage remake via emulation station and then launch an autohotkey exe file straight after it.

      I made a bat file and when I test the file stand-alone, it works fine.

      When I try and launch the bat file from Emulation Station, it displays odd behaviour, the bat file works however the game switches to the background whilst i see my windows desktop.

      Any ideas guys?

      1 Reply Last reply Reply Quote 0
      • cyperghostC
        cyperghost
        last edited by cyperghost

        If you are on a windows mashine try START

        @echo off
        start x:\programms\autohotkey "your autohotkey scrpit here.ah"
        emulationstation
        

        edit: Highlited Code Block

        1 Reply Last reply Reply Quote 0
        • meleuM
          meleu
          last edited by

          I'm a little lost... Why are there people asking for support on a Windows environment? Is there some trick to use RetroPie on Windows?

          Like @makaveeti and this guy here: https://retropie.org.uk/forum/topic/11026/multiple-rom-path-for-a-single-system

          • Useful topics
          • joystick-selection tool
          • rpie-art tool
          • achievements I made
          cyperghostC 1 Reply Last reply Reply Quote 1
          • cyperghostC
            cyperghost @meleu
            last edited by

            @meleu Well I think that are just questions for the base using of OSes. As you know windows offers a lot and nothing :D RetroPie offers a full preset of settings.
            AFAIK ES for windows ist also running fine - but no preset available :)
            But I will answer the guy in your posting!

            1 Reply Last reply Reply Quote 0
            • M
              makaveeti
              last edited by

              Hi,

              Apologies guys, I'll describe my issue more clearly. I'm using the latest build of EmulationStation on Windows 7 x64.

              I've configured the systems I wish to emulate.

              I'm trying to configure the launching of simple windows games (streets of rage remake in this instance).

              My es_systems.cfg entry for windows games looks like this:

                 	<system>
              	<name>windows</name>
              	<fullname>Windows</fullname>
              	<path>~\.emulationstation\roms\windows</path>
              	<extension>.lnk</extension>
              	<command>"%ROM%"</command>
              	<platform>windows</platform>
              	<theme>windows</theme>	
              </system>
              

              I have the windows game streets of rage remake (folder labelled sorr) in the roms folder.

              In the root roms folder I made a windows shortcut (.lnk) to the exe in the sorr folder. I tested this in ES and it launched perfectly.

              I then created a windows shortcut in the root roms folder to a .bat file in the sorr folder. The bat file contains the following code:

              @echo off
              start sorr.exe
              exit

              When I execute this .bat file within windows, the game launches perfectly. Full screen and starts playing.

              When I execute the same from ES, the game launches however the result is a odd. The screen resolution is resized as per the game however I only see my desktop (with ES and the game running in the background) (see screenshot).
              alt text

              It feels like EmulationStation doesn't like .bat files. I replicated the exact same configuration in RetroFE and that works perfectly.

              The reason why I need to use a batch file is that I need to launch 2 exes files for my windows games (1st exe is the game, 2nd is an AHK script in the form of an exe file).

              Any ideas please?

              1 Reply Last reply Reply Quote 0
              • M
                makaveeti
                last edited by

                @cyperghost - Can you offer any advice to my latest post please?

                1 Reply Last reply Reply Quote 0
                • cyperghostC
                  cyperghost
                  last edited by cyperghost

                  No not really. What does your script file do?
                  If you start the Batch file without the AHK then the windows also be hidden?
                  Why do you use lnk filemask to start bat files?
                  And annother maybe mistake.... Windows does not know ~

                  Type cmd terminal opens write set
                  There is a list of all variables....
                  Instead of ~ use %homepath% or %userprofile% or the full path

                  1 Reply Last reply Reply Quote 0
                  • M
                    makaveeti
                    last edited by

                    @cyperghost Ignore the script file for now.

                    I'll simply the issue some more.

                    here is my entry for the es_system.cfg file:

                       	<system>
                    	<name>windows</name>
                    	<fullname>Windows</fullname>
                    	<path>~\.emulationstation\roms\windows</path>
                    	<extension>.bat</extension>
                    	<command>"%ROM_RAW%"</command>
                    	<platform>windows</platform>
                    	<theme>windows</theme>	
                    </system>
                    

                    My game folder (sorr) is in the roms folder. I have created a file in the root roms folder called sorr.bat. The contents of the bat file are:

                    @echo off
                    cd sorr
                    start sorr.exe
                    exit

                    Running the sorr.bat file from windows runs successfully as the game should.

                    Running the above file from ES results in an error 'windows cannot find sorr.exe'

                    If I copy the sorr game folder to C:\Emulationstation and then try run sorr.bat from ES, the game launches however it runs in the background with ES and shows me my desktop.

                    alt text

                    I'm afraid i'm not an advanced user of the command prompt and do not know how to set variables etc.

                    This behaviour seems to only occur with .bat files and ES. Maybe you can try replicate the issue and advise me what the cause is please?

                    herb_fargusH 1 Reply Last reply Reply Quote 0
                    • herb_fargusH
                      herb_fargus administrators @makaveeti
                      last edited by

                      @makaveeti I've done a bit with batch scripts on Windows with ES. This is what I did for scummvm:

                      https://github.com/HerbFargus/Portable-Game-Station/blob/2c6479815eea45862332b120bc99686491b1687c/.emulationstation/roms/scummvm/readme.txt

                      I imagine you could adapt it for what you're trying to do. If it's being dumb remove spaces or throw in quotation marks. It's a tad picky. Good luck!

                      If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                      Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                      1 Reply Last reply Reply Quote 0
                      • M
                        makaveeti
                        last edited by

                        @herb_fargus Dude - you are a LEGEND! Your advice has solved my issue completely!

                        I used the following code in my .bat file

                        pushd "%HOMEPATH%.emulationstation\roms\windows\sorr"
                        start ahkscript.exe
                        %HOMEPATH%.emulationstation\systems\cmd.exe /C "sorr.exe"

                        Both exes launch perfectly. Exiting the game shutsdown both the game and the ahkscirpt file as expected and it returns me to ES successfully.

                        I don't know how to thank you mate. I really appreciate your help. I was stuck and getting nowhere. Now I can focus on the hardware I need to run my ES system on.

                        You've made my day :)

                        herb_fargusH 1 Reply Last reply Reply Quote 0
                        • herb_fargusH
                          herb_fargus administrators @makaveeti
                          last edited by

                          @makaveeti glad you got it sorted :)

                          If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

                          Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.