Can someone help me write scripts for batch files please?

Home Forums Scripting General Scripting Can someone help me write scripts for batch files please?

This topic contains 3 replies, has 4 voices, and was last updated by Avatar alas1501 2 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Avatar
    CharGP02A
    Member
    #152656

    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:gamesbyskateboard.nrg”
    DTAgent.exe -mount 1,”d:gamesbysoccer.nrg”
    DTAgent.exe -mount 2,”d:gamesScooby-DooFPP.nrg”
    DTAgent.exe -mount 3,”d:gamesOddParents.iso”
    DTAgent.exe -mount 4,”d:gamesBuzz2G.iso”
    DTAgent.exe -mount 5,”d:gamesRAT2.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:gamesbyskateboard.nrg”
    dtlite.exe -mount 1,”d:gamesbysoccer.nrg”
    dtlite.exe -mount 2,”d:gamesScooby-DooFPP.nrg”
    dtlite.exe -mount 3,”d:gameschutesnladders.iso”

    Batch file from another PC that has DAEMON Tools Lite:

    c:progra~1daemon~1dtlite.exe -unmount 0
    c:progra~1daemon~1dtlite.exe -unmount 1
    c:progra~1daemon~1dtlite.exe -unmount 2
    c:progra~1daemon~1dtlite.exe -unmount 3
    rem c:progra~1daemon~1dtlite.exe -mount 0,”d:gamesCat in the Hat.nrg”
    c:progra~1daemon~1dtlite.exe -mount 1,”d:gamesFreddie Fish 1.nrg”
    c:progra~1daemon~1dtlite.exe -mount 2,”d:gamesMiss Spiders Tea Party.nrg”
    c:progra~1daemon~1dtlite.exe -mount 3,”d:gamesZoombinis 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 ^_^

    Avatar
    v-2nas
    Member
    #338273

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

    Hi,

    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.

    Avatar
    vonPryz
    Member
    #347534

    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:daemontoolspro.exe then set dexec=c:daemontoolspro.exe else set dexec=c:daemontoolslite.exe
    [/CODE]Use set /p to prompt for input.

    [CODE]:menu
    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?”
    [/CODE]Test the user input:
    [CODE]if “%pickedOption%” equ A then goto:KidGames
    if “%pickedOption%” equ B then goto:BigGames
    if “%pickedOption%” equ X then goto:QuitMenu
    goto:menu
    [/CODE]-vP[CODE]if exist c:daemontoolspro.exe then set dexec=c:daemontoolspro.exe else set dexec=c:daemontoolslite.exe
    [/CODE]Use set /p to prompt for input.

    :menu
    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?”
    [/CODE]Test the user input:
    [CODE]if “%pickedOption%” equ A then goto:KidGames
    if “%pickedOption%” equ B then goto:BigGames
    if “%pickedOption%” equ X then goto:QuitMenu
    goto:menu
    [/CODE]-vP[CODE]:menu
    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?”
    [/CODE]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
    goto:menu
    [/CODE]-vP[CODE]if “%pickedOption%” equ A then goto:KidGames
    if “%pickedOption%” equ B then goto:BigGames
    if “%pickedOption%” equ X then goto:QuitMenu
    goto:menu
    [/CODE]-vP

    Avatar
    alas1501
    Member
    #391500

    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.

    “DTLauncher.exe”-unmount_all
    [USER=”68995″]Echo[/USER] off
    echo DO NOT CLOSE THIS WINDOW. SOFTWARE LOADING
    sleep 30
    DTAgent.exe -mount, dt, E, “C:Xfer HereDVDD0001-26.iso”
    timeout /t10
    DTAgent.exe -mount, dt, F, “C:Xfer HereDVDD0002-26.iso”
    timeout /t10
    DTAgent.exe -mount, dt, I, “C:Xfer HereDVDD0003-26.iso”
    timeout /t10
    DTAgent.exe -mount, dt, J, “C:Xfer HereDVDD0004-26.iso”
    timeout /t10
    DTAgent.exe -mount, dt, K, “C:Xfer HereDVDD0005-26.iso”
    timeout /t10
    DTAgent.exe -mount, dt, L, “C:Xfer HereDVDD0006-15.iso”
    timeout /t10
    DTAgent.exe -mount, dt, M, “C:Xfer HereDVDD0007-04.iso”
    timeout /t10
    DTAgent.exe -mount, dt, N, “C:Xfer HereDVDD0008-00.iso”
    timeout /t10
    DTAgent.exe -mount, dt, O, “C:Xfer HereDVDR0009-77.iso”
    timeout /t10
    DTAgent.exe -mount, dt, P, “C:Xfer HereDVDR0010-61.iso”
    timeout /t10
    DTAgent.exe -mount, dt, Q, “C:Xfer HereDVDR0011-48.iso”
    timeout /t10
    DTAgent.exe -mount, dt, R, “C:Xfer HereDVDR0012-40.iso”
    timeout /t10
    DTAgent.exe -mount, dt, S, “C:Xfer HereDVDR0013-40.iso”
    timeout /t10
    DTAgent.exe -mount, dt, T, “C:Xfer HereDVDR0014-26.iso”
    timeout /t10
    DTAgent.exe -mount, dt, U, “C:Xfer HereDVDR0015-17.iso”
    timeout /t10
    DTAgent.exe -mount, dt, V, “C:Xfer HereDVDR0016-03.iso”
    timeout /t10
    exit

    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.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.