Author Topic: Windows 7 can't launch a batch file  (Read 5617 times)

dougan78

  • Full Member
  • ***
  • Posts: 159
  • Karma: +4/-0
    • View Profile
Windows 7 can't launch a batch file
« 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

dougan78

  • Full Member
  • ***
  • Posts: 159
  • Karma: +4/-0
    • View Profile
Re: Windows 7 can't launch a batch file
« Reply #1 on: November 17, 2018, 06:55:29 PM »
Using latest download off site

StoningtonQB

  • Jr. Member
  • **
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: Windows 7 can't launch a batch file
« Reply #2 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.

dougan78

  • Full Member
  • ***
  • Posts: 159
  • Karma: +4/-0
    • View Profile
Re: Windows 7 can't launch a batch file
« Reply #3 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

Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Windows 7 can't launch a batch file
« Reply #4 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


dougan78

  • Full Member
  • ***
  • Posts: 159
  • Karma: +4/-0
    • View Profile
Re: Windows 7 can't launch a batch file
« Reply #5 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.


Pieter Hulshoff

  • Administrator
  • Hero Member
  • *****
  • Posts: 1534
  • Karma: +46/-14
    • View Profile
    • Towel 42
Re: Windows 7 can't launch a batch file
« Reply #6 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.

dougan78

  • Full Member
  • ***
  • Posts: 159
  • Karma: +4/-0
    • View Profile
Re: Windows 7 can't launch a batch file
« Reply #7 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. 

johnm

  • Newbie
  • *
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: Windows 7 can't launch a batch file
« Reply #8 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"

Multiplexer

  • Newbie
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Windows 7 can't launch a batch file
« Reply #9 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.

dougan78

  • Full Member
  • ***
  • Posts: 159
  • Karma: +4/-0
    • View Profile
Re: Windows 7 can't launch a batch file
« Reply #10 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!

JonahUK

  • Newbie
  • *
  • Posts: 35
  • Karma: +16/-0
    • View Profile
Re: Windows 7 can't launch a batch file
« Reply #11 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.
« Last Edit: November 21, 2018, 04:07:40 PM by JonahUK »