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

[RESOLVED] Bat file, mount iso for pc game (help)


Recommended Posts

Posted

Hello,

I have a little problem with one thing.

I did exactly what is said here for launch a pc game:

http://www.gameex.in...mes/#entry89514

The iso mount fine, but after the 9 seconds it return to gameex whitout launch the game.

I put the command line from the bat here:

@echo off

cls

echo.

SET INPUT1=%1

SET ROMFile=%INPUT1:~1,-1%

set str=%ROMFile%

set str=%str:.lnk=%

If EXIST "%programfiles%\DAEMON Tools Lite\DTLite.exe" (SET mounter="%programfiles%\DAEMON Tools Lite\DTLite.exe")

If EXIST "%programfiles(x86)%\DAEMON Tools Lite\DTLite.exe" (SET mounter="%programfiles(x86)%\DAEMON Tools Lite\DTLite.exe")

SET isopath=E:\GameEx\GameEx\Emulateur Games\JeuxPc\Iso des jeux

If EXIST "%isopath%\%str%.ccd" (goto isCCD)

If EXIST "%isopath%\%str%.cue" (goto isCUE)

If EXIST "%isopath%\%str%.mds" (goto isMDS)

If EXIST "%isopath%\%str%.iso" (%mounter% -mount dt,0,"%isopath%\%str%.iso")

If EXIST "%isopath%\%str%.bin" (%mounter% -mount dt,0,"%isopath%\%str%.bin")

If EXIST "%isopath%\%str%.img" (%mounter% -mount dt,0,"%isopath%\%str%.img")

goto Exit

:isCCD

%mounter% -mount dt,0,"%isopath%\%str%.ccd"

goto Exit

:isCUE

%mounter% -mount dt,0,"%isopath%\%str%.cue"

goto Exit

:isMDS

%mounter% -mount dt,0,"%isopath%\%str%.mds"

goto Exit

:Exit

ping -n 9 127.0.0.1 >NUL

All path is correct.

Is it an error in the commande line ?

Tanks, and sorry for my poor english.

Posted

We can make it quite a bit more simple than all of that, but first let's back up before we attempt to troubleshoot.

  1. What Emulator are you using?
  2. Are you using DaemonTools Lite?

You may also want to get proactive and post your emulator config, and your GameEx Log. See here if you are unsure of how to do that:

[GUIDE] How to ask for Help

Edit: Sorry, I realized that we may be talking about a PC game here. If that's the case, it would be especially worthwhile to post how you've got this configured in GameEx (the 'emulator' config)

Posted

Thank you for responding.

1.It's [PC] Microsoft Windows

2.Yes i'm using Daemon tools Lite.

[Emulator]

Enabled=True

System=Microsoft Windows

Category=PC

Emulator=Windows

Version=

Rating=

DownloadUrl=

RequiredFiles=

Website=

Info=

TitleText=Microsoft Windows

StartPageName=[PC] Microsoft Windows

StartPageLogo=Microsoft Windows

Command=""[ROMPATH]\[ROMFILE]""

RomFilter=*.lnk

Database=

ConfigFile=[Mapping Off] Exit (Process Close)

MapFile=

RomPath=E:\GameEx\GameEx\Emulateur Games\JeuxPc

SnapPath=E:\GameEx\GameEx\EmulateurAllCov\Microsoft Windows\Snaps

TitlePath=E:\GameEx\GameEx\EmulateurAllCov\Microsoft Windows\Titles

BoxPath=E:\GameEx\GameEx\EmulateurAllCov\Microsoft Windows\Boxes

CartPath=E:\GameEx\GameEx\EmulateurAllCov\Microsoft Windows\Cartridges

ManualPath=E:\GameEx\GameEx\EmulateurAllCov\Microsoft Windows\Manuals

ControlPanelPath=E:\GameEx\GameEx\EmulateurAllCov\Microsoft Windows\Controls

WorkingPath=E:\GameEx\GameEx\Emulateur\Microsoft Windows

MapKeys=True

WaitBeforeKeys=

SendKeys=

ReplaceDash=False

ReplaceUnder=True

Capitals=False

RemoveBrackets=True

ShowDesktop=True

Debug=False

AlsoLaunch=

OLDatZip=

LaunchBefore="E:\GameEx\GameEx\Emulateur\Microsoft Windows\Startup Windows Games.bat" "[ROMFILE]"

LaunchAfter=

ExcludedFiles=

CustomBackground=

PlayMusic=False

DontShowInfo=

PlaySelectionMusic=False

SelectionMusicFolder=

PCGame=False

GamesIn7Zips=False

PlayInScreenSaver=False

ShowMostPlayed=True

RandomMostPlayed=True

CDCheck=False

CDCheckFile=

VideoSnapPath=E:\GameEx\GameEx\EmulateurAllCov\Microsoft Windows\Videos

lastgame=

I don't have error message, and Gameex doesn't crash.

any idea?

Posted

Please run the program again within GameEx and then provide us with a copy of your log.txt file. Thanks!

Posted

nullPointer

If there is another possibility for doing the same thing, please could you tell me how to do ?

I think it's possible, but it may depend on some additional information. Providing a copy of your log file after attempting to run your game will help towards that end.

Beyond that, tell us a bit about what you're trying to do. Mostly I'm curious about what your shortcuts are pointed at. Is this game installed on your hard drive (i.e. it requires a verification disc to be present while running)? Or does the disc itself contain the game you're running in its entirety?

Posted

This line is what sticks out!

LaunchBefore="E:\GameEx\GameEx\Emulateur\Microsoft Windows\Startup Windows Games.bat" "[ROMFILE]"

This would work if the rom was in the same directory as your bat file which I'm not sure it is since you're using other directories for the rom path. So shouldn't it it be this instead?

LaunchBefore="E:\GameEx\GameEx\Emulateur\Microsoft Windows\Startup Windows Games.bat" "[ROMPATH]\[ROMFILE]"

Even that may need some tweaking depending on the rom itself.

Posted

This line is what sticks out!

LaunchBefore="E:\GameEx\GameEx\Emulateur\Microsoft Windows\Startup Windows Games.bat" "[ROMFILE]"

This would work if the rom was in the same directory as your bat file which I'm not sure it is since you're using other directories for the rom path. So shouldn't it it be this instead?

LaunchBefore="E:\GameEx\GameEx\Emulateur\Microsoft Windows\Startup Windows Games.bat" "[ROMPATH]\[ROMFILE]"

Even that may need some tweaking depending on the rom itself.

That part really tripped me up to, and it took me a couple of minutes to wrap my head around it. He's passing the full rom file name into the batch file, and then dropping the extension (.lnk) using substring removal:



SET INPUT1=%1
SET ROMFile=%INPUT1:~1,-1%

set str=%ROMFile%
set str=%str:.lnk=%
...
SET isopath=E:\GameEx\GameEx\Emulateur Games\JeuxPc\Iso des jeux

So the path for the disc images is hard coded into the batch script. So long as the disc image is named the same as the shortcut, the disc mounting component should theoretically work (sounds like it even is working in his test case). The strange part is why you wouldn't just pass the [ROM] parameter into the batch file and forego the string replacement step all together.

Even better I'm hoping that all of his disc images are in the same format. The only way I could see a strong argument for using this batch script would be if you had several disc images in different formats (which it seems capable of handling). If all of the disc images are in the same format, I don't see a reason not to use a (much) simpler launch before command to mount the image.

Even after all of that, I suspect of that this guys problem may be with whatever he's doing with those shortcuts (are they pointed at the proper executable, do they point at a simple launcher, etc.)

Posted

Ah ok. Don't really see the point of this batch file but according to the directions then it should be:

LaunchBefore=call "E:\GameEx\GameEx\Emulateur\Microsoft Windows\Startup Windows Games.bat" "[ROMFILE]"

  • Like 1
Posted

And the winner is ...... fRequEnCy !!

I just add the call to the commande line, and now works perfectly.

Thank you all, you're cool and patient.

Posted (edited)

Glad to hear you got everything working to your satisfaction Dimouniat! Well spotted fReq (as usual)! Marking as resolved.

Edited by nullPointer
This thread is now closed. If the problem re-occurs, please start a new thread.
Guest
This topic is now closed to further replies.
×
×
  • Create New...