Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider donating by either clicking this text or the Patreon link on the right.

Patreon

[ATTN TOM] Normal PC Game with "(" & ")" in the starting .bat file


Recommended Posts

Posted

I appologize in advance if this has been asked before, or is in the wrong area for posting.

 

The Statement Being Made...

I noticed that when trying to lauch a game with a batch file, if there are "()" in the file name, it just kicks you back to GameEx after trying to launch it.

But, if you replace the "()" for "[]" instead, the game will launch with no issues at all.

 

Example #1

Trying to lauch:   Wolfenstein_-_(Original).bat

Result:  After trying to launch the game, it just kicks you back to GameEx.

 

Example #2

Trying to lauch:   Wolfenstein_-_[Original].bat

Result:  After trying to launch the game, it Works, without any issues.

 

The Question:

Does GameEx not allow the use of "()"  in the rom name? In this case, a batch file   "gamename_-_(some_info).bat"   ?

If GameEx does not allow the use of the "()" in this way, is there a way to have this implemented? 

 

Thanks for any response in Advance!

Posted

While @Tom Speirs will need to address if changing is possible, it may be hard-coded. 

What is the purpose of using the ( ) vs. [ ] ?

If [ ] is a working solution then that is what I would opt for and call it a day.

Posted (edited)

@Draco1962  Yes, this would be the choice at first hand, however...

Taking into consideration, each title of every thing that needs their name changed, ie:

 - Pics for the game (Box/Snaps/Title/Cart/Marquee/Manuals/Logos/Background/Videos/):  9 items

- Batch file for running game or Rom file: 1 item

- Number of games (PC, Consoles, etc):   70,000 items (or so)

So that is 10 edits per game at 70,000 = 700,000 Edits to be performed

That is a lot of editing even with a program such as Notepad+ to do a batch renaming (do-able, yes), but then there are ReadMe.txt files for about half of those that need manual editing to change the new format.

 

This is a collection that started back in the late 1990's and on going, so that is a lot of editing :(

Also, preferance, the "( )" look more eye pleasing to myself in a name then the raw look of "[ ]" ;)

So, the question was brought up if do able or not.  If not, I get it, and I'll hunker down and begin the process.

 

GameEx.ini log.txt

Edited by Lorecarver
Adding GameEx.ini & Log.txt files
Posted

Yikes! Another few questions then -

Has this ever worked for you with GameEx?

If so, do you recall when it stopped?

What is the purpose of launching game or ROM files via batch files?

Would you mind attaching copies of your gameex.ini and log.txt files from right after launching one of the affected batch files? Thanks.

Posted

Actually, as only 25% of the games are run by batch files, I don't think I ever checked the ones that had the "( )" in the file names, until recently.  I just assumed they were like others with out the "()" and would just work lol.

The batch file also calls other programs and other fine tuning, etc. Allows for very well organization.

I edited my last post with requested files.

Posted

Let's narrow this down a little with a two-part question:

Is it only the batch files with parentheses in the file names that are not launching via GameEx or is it ALL with parentheses whether launched via emulator or integrated emulator support (e.g., MAME)?

Posted

I did some checking here as that same question hit me last night and I assuming that because there were issues with two types of files, it would be the same for all is my bad thinking here.  So as you said narrowing it down would make things easier to finding a solution.

Findings so far...

Batch files:  With parentheses kick back and won't launch

Batch files: Without parentheses work fine

 

Autoit Script files:  ".au3" with  parentheses kick back and won't launch

Autoit Script files: Without parentheses work fine

 

MAME: With/Without both work fine

 

Daphne:  With parentheses kick back and won't launch

Daphne: Without parentheses work fine

 

Going through all Categories and emulators today to see whatelse, will report back.

Posted

Are you leveraging the internal DAPHNE support or staged as a separate emulator (emulator 1 Laser Disc Games using .au3) when the error occurs?

Or does it happen with both?

My guess is with just the ones you are launching with Autoit scripts.

Posted (edited)

I have two Laserdisc setups...

1) Daphne which is internal using the GameEx setup wizard

      No issues with this

 

2) Daphne/Singe which is external and using Autoit Scripts to launch

    Can not have parentheses in the name of the script file or GameEx kicks you back after launching

 

A)  All other PC Games run from ".bat" files & ".au3" files depending on their makeup, type, etc...

    Can not have parentheses in the name of the batch file / AutoIt Script or GameEx kicks you back after launching

 

Narrowing it down, it looks like the issues are just with "*.bat" & "*.au3" files being launched if they have the parentheses in them.

 

Testing: 

1a)  If I have GameEx remove the text in the brackets, the game launches (this however I do not want to do, but done to see if the actual file could launch with parentheses in the name, but then removed by GameEx, which it does.)

2a)  If I change the actual file name to use "[ ]" instead of "( )", the game lauches either way, wich GamEx removing the text and if not removing the text.

Conclusion:  GameEx does not want to launch the file if the parentheses and text are showing in the game menu list?

Edited by Lorecarver
Update
Posted

Thanks for the answers regarding. I don't leverage Autoit scripts, preferring to, when I do, compile them into .exe files and created shortcuts (.lnk) for launching. I have not used .bat files for a long time. 

As an aside, it would be interesting to see if .lnk (shortcut) files with parentheses in the filename are similarly impacted. I will try to test that soon.

Posted
On 11/15/2024 at 5:35 PM, Draco1962 said:

As an aside, it would be interesting to see if .lnk (shortcut) files with parentheses in the filename are similarly impacted. I will try to test that soon.

I hope to test a hypothesis regarding this when a game is direct launched via GameEx emulator slot (e.g. via .bat, .lnk, or .au3 files) vs. launched via emulator through GameEx (e.g. MAME, DAPHNE, etc.).

If my assumptions are correct and based upon the issue as reported this should only impact the former while emulator should be unaffected and launch properly when the ROM has parentheses in the filename.

Posted

From my testing, you are correct.  No issues with the emulator through GameEx launching the ROM that has parentheses in the filename.

The issue appears to be lauching a game directly launched via GameEx emulator slot, but only if the filename has parentheses in it.

(e.g.  "game_-_(someinfo).bat", "game_-_(someinfo).au3", etc...)

 

  • Like 1
Posted

UPDATE: Within GameEx Arcade Edition v18.84 and using one of my emulator slots and direct launching games using a shortcut or file with .lnk as the extension, I changed the filename to include parentheses. I was not able to replicate the error reported. Other than available options displayed, AE should be the same as regular GameEx.

Excerpt from log.txt file after launching Microsoft Flight (Simulator X).lnk from Emulator 5: Flight Sims: 

16:52:48.75  11/17/2024:  Running: cmd.exe /c E: E:\Microsoft Games\Microsoft Flight Simulator X\fsx.exe

@Tom Speirs will need to chime in with additional steps to triage or advise if there are limitations to launching files with () in the file names for Autoit Scripts (.au3) or batch (.bat) files.

Attached are my gameex.ini and log.txt files

GameEx.ini log.txt

  • Draco1962 changed the title to [ATTN TOM] Normal PC Game with "(" & ")" in the starting .bat file
Posted

I have tested further using a batch file to open Notepad++ to launch via the same emulator slot. Results:

  • All files, either as .bat or .lnk pointing to the batch file with or without parentheses in the file name launched in the background only. Gamepad stopped funtioning so had to navigate with keyboard.
  • Shortcuts directly to the Notepad++.exe, with or without parentheses in the filename, launched in the foreground and returned to GameEx Arcade Edition with no impacts to gamepad functionality.
Posted

When it happens can you confirm whether or not the games - testing both .au3 and .bat - are actually launching but not displaying? It will require ALT-TAB after launch attempt.

Thanks

Posted

Yes, I have confirmed that they DO NOT launch, GameEx just immediately kicks you back to the games menu.

I have also found out via testing, you can not have a coma in either of those files either in the name.

ie of things that will not start:

    "game_The_Saga_-_(Version_1).bat"   /   "game_The_Saga_-_(Version_1).au3"

   "game,_The_Saga_-_(Version_1).bat"   /   "game,_The_Saga_-_(Version_1).au3" 

   "game,_The_Saga_-_Version_1.bat"   /      "game,_The_Saga_-_Version_1.au3" 

Yes, I have Alt-Tab'd to check on every instance, and no, the games do not lauch.

Maybe Tom has the answer if it is hard coded to not allow these characters?

I am also starting to assume it is with only certain special characters aswell (though I do not have the "%" in any of my starting batch or autoit files, Thank Goodness ;) ),     ie:  %, & 

I will check and report back.

Posted

Ok, I am a little confused. In the file name examples you are indicating that none of the filenames listed with or without the ( ) in the filenames.

Good info here and more for file naming conventions - https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file

Yes, Tom will need to confirm whether or not GameEx has additional character restrictions. It is not uncommon for apps to have additional restrictions. If that is the case, you may have some renaming in your future. Not what you may want to here but may be what you have to do.

Posted

@Draco1962 Yes, sorry, I forgot to mention, the last example was a file name with a comma  " , " in it.  

I found batch files and autoit files were also not launching if there was a comma in the filename, hence which got me thinking, "Perhaps other characters are not going to work, like "&" or "%" in the filename".

As to your statement about redoing some renaming in the future, if it has to be done, it has to be done :), I totally get it.  Had to post in the off chance it was a quick fix or not.

Posted

I had a look. i can see no reason why .bat files with curly brackets won't launch but other .bat files will.

Are you sure it is not just an issue with .bat and .au3 in general? That is what i am thinking.

One thing i did notice is you should wrap your command line in quotes.

Posted
7 hours ago, Lorecarver said:

@Draco1962 Yes, sorry, I forgot to mention, the last example was a file name with a comma  " , " in it.  

I found batch files and autoit files were also not launching if there was a comma in the filename, hence which got me thinking, "Perhaps other characters are not going to work, like "&" or "%" in the filename".

As to your statement about redoing some renaming in the future, if it has to be done, it has to be done :), I totally get it.  Had to post in the off chance it was a quick fix or not.

The following reserved characters should not be used as they are reserved by the OS:

< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
 

& (ampersand) should probably be avoided as well as % (percent). Spaces, while not verboten, can be problematic from a naming perspective if you have a ROM filename with an extra space that is hard to be seen and your media does not have an extra space in the same place.

Definitely try again with " surrounding your [ROMPath]\{ROMFile] replacing the instances of Command=cmd.exe /c [ROMPath]\[ROMFile] with Command=cmd.exe /c "[ROMPath]\[ROMFile]" as Tom has suggested. Test and provide updated gameex.ini, log.txt, and runitgame.bat files. Thanks!

Posted (edited)

Changed as suggested above, still, no effect :( 

attached, files requested.

GameEx.ini log.txt runitgame.bat

 

Update:  I tested on two other computers, both running only GameEx on windows 11.

The same results were occuring on these seperate two computers as the first one.

As usual, the *.bat files and *.au3 files work flawlessly outside of GameEx (running on their own), however, when launched from within GameEx, the same results occur.  The .bat / .au3 files with "( )" in their filenames, kick you back to the Game's Menu.

Note #2:  Take these same files and in the config, have "Remove text from Brackets" set to "Yes", and the two types of files will launch, set this field back to "No" and they will Not launch and kick you back to the game menu.  Obviously, setting this field to "Yes" is not my desired action.  Curious if anyone else is having the same issues I found, and weird that all 3 computers do the same thing.  I will note also, the other two computers were clean installs of Windows 11, no other added programs and GameEx with just one slot made just to test the 2 file types with and without "( )" in their file names.  Not sure how this is a .bat/.au3 issue, as stated, no issues with them launching outside of any program, nor with GameEx, except when in GameEx and the filenames have "( )" in them....  

Edited by Lorecarver
Updated Information!
Posted

And no instance of any of them launching and showing running when you alt-tab or look in Task Manager? That is what I find puzzling as my testing with the .bat files named with parenthesis launched, but GameEx returned to the selection and the "game" was running in a window found when I alt-tabbed to it.

I don't think that Tom was able to find anything within GameEx that would cause this programatically. Not saying it will not be exploreed further, but at least there are now two workarounds - rename the files (least favorable) or select "Remove text from Brackets" set to "Yes". 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...