No announcement yet.

Can someone help me write scripts for batch files please?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Can someone help me write scripts for batch files please?

    These are the requirements I need for my batch files on Windows XP:

    I want a script running at startup that mounts 4 images for younger kids.
    I want a script on the desktop that dismounts those 4 and mounts up 4 older kids games
    I also want to be able to click a desktop icon to put the younger kids games back up if I click on it
    I want it to mount the images without it autorunning the CD too (that means that when the images are mounted to DAEMON Tools Pro or Lite, the games won't start up automatically)

    I want to do this to 3 computers. One computer runs DAEMON Tools Pro Standard and the other two run DAEMON Tools Lite. I have batch files created that mounts the games but I need some help completing all of those steps above properly. Can the community help me please?

    Batch file from PC with DAEMON Tools Pro Standard:

    DTAgent.exe -unmount 0
    DTAgent.exe -unmount 1
    DTAgent.exe -unmount 2
    DTAgent.exe -unmount 3
    DTAgent.exe -unmount 4
    DTAgent.exe -unmount 5
    DTAgent.exe -mount 0,"d:\games\byskateboard.nrg"
    DTAgent.exe -mount 1,"d:\games\bysoccer.nrg"
    DTAgent.exe -mount 2,"d:\games\Scooby-DooFPP.nrg"
    DTAgent.exe -mount 3,"d:\games\OddParents.iso"
    DTAgent.exe -mount 4,"d:\games\Buzz2G.iso"
    DTAgent.exe -mount 5,"d:\games\RAT2.iso"

    Batch file from a PC with DAEMON Tools Lite:
    dtlite.exe -unmount 0
    dtlite.exe -unmount 1
    dtlite.exe -unmount 2
    dtlite.exe -unmount 3
    dtlite.exe -mount 0,"d:\games\byskateboard.nrg"
    dtlite.exe -mount 1,"d:\games\bysoccer.nrg"
    dtlite.exe -mount 2,"d:\games\Scooby-DooFPP.nrg"
    dtlite.exe -mount 3,"d:games\chutesnladders.iso"

    Batch file from another PC that has DAEMON Tools Lite:

    c:\progra~1\daemon~1\dtlite.exe -unmount 0
    c:\progra~1\daemon~1\dtlite.exe -unmount 1
    c:\progra~1\daemon~1\dtlite.exe -unmount 2
    c:\progra~1\daemon~1\dtlite.exe -unmount 3
    rem c:\progra~1\daemon~1\dtlite.exe -mount 0,"d:\games\Cat in the Hat.nrg"
    c:\progra~1\daemon~1\dtlite.exe -mount 1,"d:\games\Freddie Fish 1.nrg"
    c:\progra~1\daemon~1\dtlite.exe -mount 2,"d:\games\Miss Spiders Tea Party.nrg"
    c:\progra~1\daemon~1\dtlite.exe -mount 3,"d:\games\Zoombinis Mountain Rescue.nrg"

    I don't need actual game titles for any new and updated batch files, I just need examples that have .iso, .nrg, or other file formats and I can replace those myself with the actual games.

    All three machines run Windows XP. If there is anything else anybody wants to know, please ask. Thank you so much ^_^

  • #2
    Re: Can someone help me write scripts for batch files please?


    I also want to be able to click a desktop icon to put the younger kids games back up if I click on it
    Add this to the batch file
    start "location of executable"

    I want it to mount the images without it autorunning the CD too
    can you post dtlite /? available commands may be there is some option or switch that you can use to stop the autorun feature.
    Thanks & Regards

    MCTS 2008, MCTIP, MCSE 2003, MCSA+Messaging E2K3, MCP, E2K7
    Sr. Wintel Eng. (Investment Bank)
    Independent IT Consultant and Architect

    Show your appreciation for my help by giving reputation points


    • #3
      Re: Can someone help me write scripts for batch files please?

      Here are some hints.

      Just create a .cmd or .bat file to any directory. Then create a shortcut on the desktop for it. You can create multiple shortcuts with desired parameters, in case you don't like to have a menu.

      Find out if you are on lite or pro system by checking whether executable exists. Then you can pre-create the mount commands as per the Daemon version syntax requirements.

      if exist c:\daemontools\pro.exe then set dexec=c:\daemontools\pro.exe else set dexec=c:\daemontools\lite.exe
      Use set /p to prompt for input.

      echo Choose wisely, o young one
      echo A) Kiddie games
      echo B) Big girls' games
      echo X) A strange game. The only winning move is not to play.
      set /p pickedOption="A, B, X?"
      Test the user input:
      if "%pickedOption%" equ A then goto:KidGames
      if "%pickedOption%" equ B then goto:BigGames
      if "%pickedOption%" equ X then goto:QuitMenu


      • #4
        Hi Guys n Girls.

        I'm trying to create a batch script to load at windows start.
        Using Windows 10 Home 64bit and a paid for version of DAEMON Tools Lite 10.4 which includes the Unlimited Devices extra part.
        I've chosen to use daemon tools over Win 10's mount, for peace of mind for my clients. Windows 10 won't hold the image and my scripting attempts to have them load on startup caused too many "Annoying windows" So i am sticking with Daemon. I used to run this way with Win 7 and it worked flawlessly, but Windows 10 and keeping up with new os's has thrown some disc dropping in., I am trying to alleviate this by running the script and am having some teething issues making it work.

        My goal is to be able to open Daemon tools through a script Unmount all drives, Then mount the following disks to the following drives. I believe all the drives stay attached even if empty. But if you know this to not be true would appreciate adding that step into the script as well. here's what i have so far.

        I don't claim to be an expert, At best i think novice gives me too much credit. The following is compiled from basic commanding found on google. And clearly it's not working for me.

        Echo off
        sleep 30
        DTAgent.exe -mount, dt, E, "C:\Xfer Here\DVDD0001-26.iso"
        timeout /t10
        DTAgent.exe -mount, dt, F, "C:\Xfer Here\DVDD0002-26.iso"
        timeout /t10
        DTAgent.exe -mount, dt, I, "C:\Xfer Here\DVDD0003-26.iso"
        timeout /t10
        DTAgent.exe -mount, dt, J, "C:\Xfer Here\DVDD0004-26.iso"
        timeout /t10
        DTAgent.exe -mount, dt, K, "C:\Xfer Here\DVDD0005-26.iso"
        timeout /t10
        DTAgent.exe -mount, dt, L, "C:\Xfer Here\DVDD0006-15.iso"
        timeout /t10
        DTAgent.exe -mount, dt, M, "C:\Xfer Here\DVDD0007-04.iso"
        timeout /t10
        DTAgent.exe -mount, dt, N, "C:\Xfer Here\DVDD0008-00.iso"
        timeout /t10
        DTAgent.exe -mount, dt, O, "C:\Xfer Here\DVDR0009-77.iso"
        timeout /t10
        DTAgent.exe -mount, dt, P, "C:\Xfer Here\DVDR0010-61.iso"
        timeout /t10
        DTAgent.exe -mount, dt, Q, "C:\Xfer Here\DVDR0011-48.iso"
        timeout /t10
        DTAgent.exe -mount, dt, R, "C:\Xfer Here\DVDR0012-40.iso"
        timeout /t10
        DTAgent.exe -mount, dt, S, "C:\Xfer Here\DVDR0013-40.iso"
        timeout /t10
        DTAgent.exe -mount, dt, T, "C:\Xfer Here\DVDR0014-26.iso"
        timeout /t10
        DTAgent.exe -mount, dt, U, "C:\Xfer Here\DVDR0015-17.iso"
        timeout /t10
        DTAgent.exe -mount, dt, V, "C:\Xfer Here\DVDR0016-03.iso"
        timeout /t10

        Any help or further conversations relating to this would be greatly appreciated! I intend on using this script for multiple pc's which are always setup the same.