Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch to Run 3 Programs  (Read 7876 times)

0 Members and 1 Guest are viewing this topic.

EchoLdrWolf316

    Topic Starter


    Intermediate

  • Don't worry, Javascript is just Flash on speeeeed.
    Re: Batch to Run 3 Programs
    « Reply #15 on: August 22, 2008, 10:25:41 AM »
    So This?:
    Code: [Select]
    @echo off
    Choice /M "Do You Want To Run Mac Look-Alike Programs?"

    If %errorlevel% EQU 2 goto no
    If %errorlevel% EQU 1 goto yes


    :yes
    start "" "C:\Program Files\Mioplanet Battery Meter\Mioplanet Battery Meter.exe"
    start "" "C:\Program Files\Pixoria\Konfabulator\YahooWidgets.exe"
    start "" "C:\Program Files\Stardock\ObjectDock\ObjectDock.exe"
    exit

    :no
    exit

    That way it doesn't matter what order
    Code: [Select]
    If %errorlevel% EQU 2 goto no
    and
    Code: [Select]
    If %errorlevel% EQU 1 goto yes are in?

    Dias de verano

    • Guest
    Re: Batch to Run 3 Programs
    « Reply #16 on: August 22, 2008, 10:30:27 AM »
    You got it.

    But I don't know what the /M switch does in CHOICE.EXE. My version does not have it.


    EchoLdrWolf316

      Topic Starter


      Intermediate

    • Don't worry, Javascript is just Flash on speeeeed.
      Re: Batch to Run 3 Programs
      « Reply #17 on: August 22, 2008, 10:43:00 AM »
      You got it.

      But I don't know what the /M switch does in CHOICE.EXE. My version does not have it.



      Code: [Select]
      choice /m "What Is Your Choice?"
      /m must come after CHOICE to indicate that the passage in quotes is the displayed message according to my system ( Vista Home Premium )


      Dias de verano

      • Guest
      Re: Batch to Run 3 Programs
      « Reply #18 on: August 22, 2008, 10:48:47 AM »
      It has changed then. I have the Windows 98 choice.exe

      Code: [Select]
      CHOICE [/C[:]choices] [/N] [/S] [/T[:]c,nn] [text]
      This is Vista choice.exe option text

      Code: [Select]
      CHOICE [/C choices] [/N] [/CS] [/T timeout /D choice] [/M text]

      EchoLdrWolf316

        Topic Starter


        Intermediate

      • Don't worry, Javascript is just Flash on speeeeed.
        Re: Batch to Run 3 Programs
        « Reply #19 on: August 22, 2008, 10:57:12 AM »
        ah, yes WIn98 Choice command needs no /m

        jonesgang



          Starter

          Re: Batch to Run 3 Programs
          « Reply #20 on: September 02, 2008, 10:02:28 AM »
          Here is another way you can start your 3 programs




          @ECHO off
          cls

          :start
          ECHO.
          ECHO Y. Start Programs
          ECHO N. Exit
          set choice=
          set /p choice=Type Y or N to run programs or exit.
          if not '%choice%'=='' set choice=%choice:~0,1%
          if '%choice%'=='y' goto progrun
          if '%choice%'=='n' goto bye
          ECHO "%choice%" is not valid please try again
          ECHO.
          goto start

          :progrun
          start "" "C:\Program Files\Mioplanet Battery Meter\Mioplanet Battery Meter.exe"
          start "" "C:\Program Files\Pixoria\Konfabulator\YahooWidgets.exe"
          start "" "C:\Program Files\Stardock\ObjectDock\ObjectDock.exe"
          goto end

          :bye
          ECHO BYE
          goto end

          :end

          EchoLdrWolf316

            Topic Starter


            Intermediate

          • Don't worry, Javascript is just Flash on speeeeed.
            Re: Batch to Run 3 Programs
            « Reply #21 on: September 02, 2008, 02:07:04 PM »
            That code works perfect also,  but I have also edited the other code a bit.
            Code: [Select]
            @echo off
            title Macilizer
            echo Macilizer starting...
            ping -n 1 -w 2000 1.1.1.1 >nul
            echo Initializing...
            ping -n 1 -w 500 1.1.1.1 >nul
            Choice /M "Do You Want To Run Mac Look-Alike Programs?"

            If %errorlevel% EQU 2 goto no
            If %errorlevel% EQU 1 goto yes

            :yes
            echo Starting Battery Meter
            ping -n 1 -w 2000 1.1.1.1 >nul
            start "" "C:\Program Files\Mioplanet Battery Meter\Mioplanet Battery Meter.exe"

            echo Starting Konfablator
            ping -n 1 -w 2000 1.1.1.1 >nul
            start "" "C:\Program

            echo Starting Object Dock
            ping -n 1 -w 2000 1.1.1.1 >nul
            start "" "C:\Program Files\Stardock\ObjectDock\ObjectDock.exe"

            ping -n 1 -w 2000 1.1.1.1 >nul
            echo Exiting....
            ping -n 1 -w 2000 1.1.1.1 >nul
            exit

            :no
            echo Exiting....
            ping -n 1 -w 2000 1.1.1.1 >nul
            exit