RetroFE forums

General Category => General Discussion & Help => Topic started by: dougan78 on November 17, 2018, 03:55:58 PM

Title: Windows 7 can't launch a batch file
Post by: dougan78 on November 17, 2018, 03:55:58 PM
If I create a batch file to launch c:\windows\notepad.exe and throw the batch file in c:\retrofe\collections\main\roms\batchfile.bat
Then Launch the batchfile menu item retrofe indicates in the logs it found the .bat file and it goes to run it but it doesnt actually run it.  Notepad.exe never appears.  Seems like this worked before.  tested on latest download.  If i copy my retrofe folder to my windows 10 computer and do the same thing notepad launches fine.

not sure what I may have blocking it or if it is a bug.  Maybe someone can help.  Thanks in advance
Title: Re: Windows 7 can't launch a batch file
Post by: dougan78 on November 17, 2018, 06:55:29 PM
Using latest download off site
Title: Re: Windows 7 can't launch a batch file
Post by: StoningtonQB on November 18, 2018, 03:47:23 AM
Why would you want RetroFE to launch Notepad to edit a batch file? Are you trying to RUN a batch file?
If so, create a launcher that looks like this:

executable = C:\Windows\System32\cmd.exe
arguments = /C "%ITEM_FILEPATH%"

and in the settings.conf in your collection, point to said launcher and make sure your list.extensions looks like this:
list.extensions = bat

I'm doing this to run my DOSBox games in RetroFE and am using batch files due to the unique constraints of the majority of games in the collection.
Title: Re: Windows 7 can't launch a batch file
Post by: dougan78 on November 18, 2018, 03:25:02 PM
I need it from the main collection.  Notepad was just a sample.  Doesnt launch anything if a bat is put in main/roms
Title: Re: Windows 7 can't launch a batch file
Post by: Pieter Hulshoff on November 18, 2018, 04:21:48 PM
Make sure your launcher is as written above, and point your Main launcher to it in collections/Main/settings.conf.

Sent from my SM-G950F using Tapatalk

Title: Re: Windows 7 can't launch a batch file
Post by: dougan78 on November 18, 2018, 09:30:15 PM
Doesnt work.

C:\retrofe\collections\main\roms\Notepad.bat

Notepad.bat contents:

c:\windows\notepad.exe


C:\retrofe\launchers\Main.conf

Main.conf contents:

executable = C:\Windows\System32\cmd.exe
arguments = /C "%ITEM_FILEPATH%"

Retrofe.log info:

[2018-11-18 15:26:15] [WARNING] [Launcher] Checking to see if "C:\retrofe\collections\Main\roms\Notepad.exe" exists  [No]
[2018-11-18 15:26:15] [INFO] [Launcher] Checking to see if "C:\retrofe\collections\Main\roms\Notepad.bat" exists  [Yes]
[2018-11-18 15:26:15] [INFO] [Launcher] Attempting to launch: "C:\Windows\System32\cmd.exe" /C "C:\retrofe\collections\Main\roms\Notepad.bat"
[2018-11-18 15:26:15] [INFO] [Launcher]      from within folder: C:\Windows\System32

But no notepad.  Doesnt work with whatever you choose on WIndows 7.  If I copy my Retrofe Folder to my Windows 10 Laptop.... Works fine.

Title: Re: Windows 7 can't launch a batch file
Post by: Pieter Hulshoff on November 19, 2018, 06:28:32 AM
Never tried it on Windows 7 to be honest. You may need a different launcher there. Unfortunately, I don’t have any computer left with Windows 7.
Title: Re: Windows 7 can't launch a batch file
Post by: dougan78 on November 19, 2018, 12:16:33 PM
That is fine.  I will use rocketlauncher for the launcher for main then.   I had too many problems with windows 10 on my cab and switched it back to 7. 

I did have someone else test on 7 and it didn’t work on their win7. 
Title: Re: Windows 7 can't launch a batch file
Post by: johnm on November 19, 2018, 11:22:31 PM

I'm on Windows 10 but have you tried putting the path in inverted commas
"c:\windows\notepad.exe"
Title: Re: Windows 7 can't launch a batch file
Post by: Multiplexer on November 20, 2018, 08:45:38 PM
It may sound silly but try adding @ECHO OFF at the start of the batch file and see if this helps.
If I recall I spent counless hours in the past trying to get batch files to launch and starting the batch file with @ECHO OFF seemed to do the trick.
Title: Re: Windows 7 can't launch a batch file
Post by: dougan78 on November 21, 2018, 01:34:21 PM
I gave up.  I tested swapping slashes.  I did test putting a .bat and using rl and then rfe complained it didn’t find a exe|txt.  The program I was running wouldn’t get focus either was another issue I ran into as well.   Thanks all for the helpful notions. 

Didn’t test @echo but focus issue killled it for me anyway.   Cheers!
Title: Re: Windows 7 can't launch a batch file
Post by: JonahUK on November 21, 2018, 03:33:19 PM
Please ignore as it works on 10 without issue and I don't have a W7 machine/VM up and running atm.