Mounting Game images automatically (1 Viewer)

johngc

Portal Member
August 7, 2006
12
3
Hi

I have managed to get a game (GTA III) installed and running on my HTPC using daemon tools and just setting the file to run under My Programs. I have daemon tools setup so that it automounts an image of CD2 everytime the PC boots as it contains the sound files and is required by the game.

Is there a way to get CD2 to mount only when I run the game rather than when the PC is turned on. The reason being is that I am going to try and install more games and don't want to be in a situation where I need to mount more than 4 images at startup (I assume it will also slow the PC down with lots of images mounted all the time).

I am assuming some sort of batch file would work, but I can't figure out how to do this with daemon tools.

Thanks
 

chefkoch

Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,129
    1,635
    Dresden / Munich / Maastricht
    Home Country
    Germany Germany
    Hi johngc

    Most important information for you are the command-line switches, i think. You can find them on DAEMON Tools Online Help.

    You can use them with following tools/solutions.

    Auto-IT
    Do you know AutoIt? It's a simple, but powerful scripting language. I often use it for such tasks.

    Here is an example script, which you can use as a base.
    Code:
    ; Mounting disc image for game
    RunWait('"' & @ProgramFilesDir & '\DAEMON Tools\daemon.exe"-mount 0,"C:\PATH_TO_IMAGE\...\nameofimage.cue"')
    
    ; Running game
    RunWait('"' & @ScriptDir & '\game.exe"')
    
    ; Unmounting disc image
    RunWait('"' & @ProgramFilesDir & '\DAEMON Tools\daemon.exe"-unmount 0')

    Then you are able to create an "GameLuncher.exe" for example. You only need to set this exe in MP. So if you need to change anything to run a game don't have to change anything in MPconfig, just the script.

    Batch-Files
    You can use simple batch files, which can also do the job.

    Code:
    rem Mounting disc image for game
    "%ProgramFiles%\DAEMON Tools\daemon.exe"-mount 0,"C:\PATH_TO_IMAGE\...\nameofimage.cue"
    
    rem Running game
    "PathToGameDir\game.exe"
    
    rem Unmounting disc image
    "%ProgramFiles%\DAEMON Tools\daemon.exe"-unmount 0

    MP-Solution
    You are able to set a pre- and post-lunch command in MPconfig > MyPrograms - Setup > Add a
    • FileLuncher item to the list > on the righ of "Wait for Exit", there is a button with an arrow. if you click it you will get yet another window, where you can enter the commands.
      + config command is in MP, no need for 3rd party tools
      + you can use details, information for each game
      - The pre-/post-commands are just for the whole fileluncher, it is not possible to set different commands for each game.
    • ApplicationeLuncher item to the list > on the righ of "Wait for Exit", there is the same button with an arrow for configuring pre-/post commands.
      + config command is in MP, no need for 3rd party tools
      + The pre-/post-commands are for this one and appluncher, you need to add one per game and set different commands for each game.
      - if i am right, you can not use details, information for each game

    I prefer the autoit solution. It's up to you what you wanna choose.

    regards
    chefkoch
     

    johngc

    Portal Member
    August 7, 2006
    12
    3
    Thank you for quick and informative reply!

    I will give them a try and see how I get on. :)
     

    Users who are viewing this thread

    Top Bottom