Scripted (Mini) Image Mounting with Daemon Tools

Discussion in 'Windows Guides' started by Titcher, May 24, 2009.

  1. Titcher

    Titcher Addict

    Joined:
    Oct 16, 2008
    Messages:
    275
    Likes Received:
    34
    Introduction
    Ok so I'm posting here to describe to you all a process that you may find handy for making your game playing that bit more streamlined. A lot of us know about Daemon Tools and it's brilliant use as an image mounter to play our games without having to get the CDs out. Well, a lot of you probably don't know that it can be scripted!

    Example Script
    This example is using Daemon Tools Lite.

    Below is an example script that I use to mount a Command and Conquer: The First Decade mini-image and then launch Zero Hour in quickstart mode. I'll describe each line after:

    Code:
    @echo off
    C:\progra~1\daemon~2\daemon.exe -mount 0,"C:\Documents and Settings\Titcher\Desktop\MI-CNCTFD\MI-CNCTFD.mds"
    cls
    ping -n 2 localhost>NUL
    start "Zero Hour" "C:\Program Files\EA Games\Command & Conquer The First Decade\Command & Conquer(tm) Generals Zero Hour\generals.exe" -quickstart
    cls
    @echo off - This line is used to stop the commands echoing back in the window, always keep this line the same.

    C:\progra~1\daemon~2\daemon.exe -mount 0,"C:\Documents and Settings\Titcher\Desktop\MI-CNCTFD\MI-CNCTFD.mds" - This line is the one that matters, it opens Daemon Tools lite and mounts the mini-image, the format is as follows; X:\pathtodaemontools\daemon.exe -mount drivenumber,"X:\pathtoimage\image.mds"

    cls - This clears the terminal window, this is just to keep things clean

    ping -n 2 localhost>NUL - This command makes the computer send two pings to itself, this is just to make it waste a second or two to let the image finish mounting

    start "Zero Hour" "C:\Program Files\EA Games\Command & Conquer The First Decade\Command & Conquer(tm) Generals Zero Hour\generals.exe" -quickstart - Here's another line that matters, this launches the game itself, the syntax is as follows; start "Game title" "X:\pathtogame\game.exe" -arguments

    cls - Command Prompt windows close automatically when they've got nothing to display, this makes sure it happens

    Notes
    The scripts are to be written using notepad or another text editor(not microsoft word). And to be saved under all files and then whatever you choose with .bat on the end. Once you've made these files and saved them wherever you choose, simply either double click them or create a shortcut to them to allow you to play your games.
    If you want there to be a fancy icon still, make a shortcut to the .bat file. Right click this shortcut and press properties. You should already be on the shortcut tab, otherwise, pick the shortcut tab. Press "Change Icon..." and browse to your game directory and pick the game executable, then pick the icon you want and press OK twice. This should give the effect of it being the original game.
    I've attached the example script in case anyone has troubles.

    Other Versions of Daemon Tools
    This method works with other versions of Daemon tools, you just need to change the path to daemon tools. If you want to find out the path, run CMD. Type "cd \". This should take you to the root of your system hard drive, if your program files are on another drive, type the drive letter and a colon, as in "H:". Once you're at the root of the drive with your program files, type "dir /X /P" (casing matters). This will display all directories, find your program files directory and note it's short name, it should be progra~1 or similar. Type "cd progra~1", this will take you to the program files directory.
    Once in the program files directory, type "dir /X /P" again, this will list the directories, find the folder for your version of Daemon Tools and note it down.
    Daemon Tools Pro uses a different executable for command line mounting, this executable is called, dtproagent.exe. This should remain true, but otherwise, check for yourself. Finally, another difference with the more advanced version of Daemon Tools is IDE and SCSI mounting, you'll need to declare which you want to use when mounting if IDE it's "dtproagent.exe -mount ide,0,"image.mds"", if it's SCSI it's "dtproagent.exe -mount scsi,0,"image.mds"". If you don't know whether you're using IDE or SCSI, you're using SCSI.
    On a final note, pirated versions of Daemon Tools will NOT allow command line mounting. So if you really must keep the image creation features, download Alcohol 52%.
     

    Attached Files:

    Last edited: May 26, 2009
    Nimrod and InsaneNutter like this.
  2. CurlySteve

    CurlySteve Elite Member

    Joined:
    Sep 26, 2007
    Messages:
    79
    Likes Received:
    15
    Location:
    Birmingham, England, UK
    looks really useful thanks. Im sure it will help for all of my mini images and saves a lot of time.
     
  3. Nimrod

    Nimrod Exotic Vendor

    Joined:
    Jun 1, 2007
    Messages:
    1,989
    Likes Received:
    526
    Location:
    London, United Kingdom
    Does this work with the free Lite version?
     
  4. Titcher

    Titcher Addict

    Joined:
    Oct 16, 2008
    Messages:
    275
    Likes Received:
    34
    Yes, that's the version used in the example. I guess I didn't state that clearly enough, I'll change that now.
     

Share This Page