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

Author Topic: Closing Batch File Window  (Read 7346 times)

0 Members and 1 Guest are viewing this topic.

Doc16743

    Topic Starter


    Rookie

    Closing Batch File Window
    « on: May 26, 2009, 05:52:52 AM »
    Anyone know how to close the batch window when the run is complete? I use batch files to open a series of applications, but the batch window remains open after the apps are all open.

    I've tried ending each batch with "exit", but it still just lays there. The window will close when I close the open apps, but would like it to close as soon as it completes its' function.

    Thanks!

    squall_01



      Prodigy

      Thanked: 80
      Re: Closing Batch File Window
      « Reply #1 on: May 26, 2009, 05:55:44 AM »
      I dont think that your telling it that.  In sense that your telling it when the app closes rather then when the bat code runs.
      Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

      If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

      Carbon Dudeoxide

      • Global Moderator

      • Mastermind
      • Thanked: 169
        • Yes
        • Yes
        • Yes
      • Certifications: List
      • Experience: Guru
      • OS: Mac OS
      Re: Closing Batch File Window
      « Reply #2 on: May 26, 2009, 06:14:51 AM »
      What is your current code?

      Doc16743

        Topic Starter


        Rookie

        Re: Closing Batch File Window
        « Reply #3 on: May 26, 2009, 08:04:50 AM »
        Current code?? Unclear what you're asking. I'm running Windows XP, and running a .bat file to open several applications with one mouse click. Once the applications are up and running, I'd like the batch window to close.

        Not sure if that comes close to answering your question.

        squall_01



          Prodigy

          Thanked: 80
          Re: Closing Batch File Window
          « Reply #4 on: May 26, 2009, 08:14:25 AM »
          do you know what a bat is?
          Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

          If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

          Doc16743

            Topic Starter


            Rookie

            Re: Closing Batch File Window
            « Reply #5 on: May 26, 2009, 09:14:03 AM »
            Now I'm completely confused. I have a moderator asking what my code is, and squall_01 asking if I know what a bat is.

            If I'm asking in the wrong forum, or my question isn't clear, please tell me.

            Squall_01 - yes, I know what a .bat is. I'm a novice at using them, though, and that's why I'm asking for advice here.

            Carbon Dudeoxide

            • Global Moderator

            • Mastermind
            • Thanked: 169
              • Yes
              • Yes
              • Yes
            • Certifications: List
            • Experience: Guru
            • OS: Mac OS
            Re: Closing Batch File Window
            « Reply #6 on: May 26, 2009, 09:16:03 AM »
            Sorry if I was unclear.

            Can you please post your batch file here so we can see what we're dealing with.

            Doc16743

              Topic Starter


              Rookie

              Re: Closing Batch File Window
              « Reply #7 on: May 26, 2009, 09:18:30 AM »
              Ah! The lightbulb just came on! I started this post from home and am at work now. Will post the .bat when I get home this afternoon.

              Thanks!

              Gean Freaks



                Beginner

                Thanked: 2
              • Certifications: List
              • Experience: Beginner
              • OS: Windows 7
              Re: Closing Batch File Window
              « Reply #8 on: May 26, 2009, 09:22:58 AM »
              Atleast, he got it finally..  ;D
              peace...  ;)
              Thank you,
                   Orlando N.
                   "NO MORE regrets.."

              http://answers.microsoft.com
              http://safety.live.com

              squall_01



                Prodigy

                Thanked: 80
                Re: Closing Batch File Window
                « Reply #9 on: May 26, 2009, 10:55:40 AM »
                I was hopeing for him to understand before carbon had to post that. 
                Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                Carbon Dudeoxide

                • Global Moderator

                • Mastermind
                • Thanked: 169
                  • Yes
                  • Yes
                  • Yes
                • Certifications: List
                • Experience: Guru
                • OS: Mac OS
                Re: Closing Batch File Window
                « Reply #10 on: May 26, 2009, 11:05:21 AM »
                If you knew what I meant, you should have told him instead of saying 'do you know what a bat is?'

                Useless question.

                Doc16743

                  Topic Starter


                  Rookie

                  Re: Closing Batch File Window
                  « Reply #11 on: May 26, 2009, 01:47:36 PM »
                  Here is what I have been using. The commands work perfectly, except for leaving the window open when the apps have started.
                  The "sleep" commands are used as the apps take a little time to open.

                  CD C:\Ham Radio\DXKeeper\
                  START "" "C:\Ham Radio\Pathfinder\Pathfinder.exe"
                  Sleep 3
                  START "" "C:\Ham Radio\DXView\DXView.exe"
                  START "" "C:\Ham Radio\DXKeeper\DXKeeper.exe"
                  Sleep 7
                  START "" "C:\Ham Radio\Commander\CI-V Commander.exe"
                  Sleep 3
                  CD C:\MULTIPSK\
                  START MULTIPSK
                  Sleep 3
                  START "" "C:\Ham Radio\Launcher\Sound.bat"
                  START "" "C:\Ham Radio\QuickMix\QuickMix.exe"
                  CD C:\
                  EXIT



                  Sorry if I was unclear.

                  Can you please post your batch file here so we can see what we're dealing with.

                  devcom



                    Apprentice

                    Thanked: 37
                    Re: Closing Batch File Window
                    « Reply #12 on: May 26, 2009, 01:53:11 PM »
                    add pause at bottom ?
                    Download: Choice.exe

                    squall_01



                      Prodigy

                      Thanked: 80
                      Re: Closing Batch File Window
                      « Reply #13 on: May 26, 2009, 03:15:13 PM »
                      I still say the that he has exit like that but I could be wrong.  Cause if your dealing with them you should know and if you tell someone what do you learn?
                      Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                      If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                      Carbon Dudeoxide

                      • Global Moderator

                      • Mastermind
                      • Thanked: 169
                        • Yes
                        • Yes
                        • Yes
                      • Certifications: List
                      • Experience: Guru
                      • OS: Mac OS
                      Re: Closing Batch File Window
                      « Reply #14 on: May 26, 2009, 08:47:42 PM »
                      You're post made no sense, Squall.

                      Doc16743, use this code:


                      Code: [Select]
                      START "" "C:\Ham Radio\Pathfinder\Pathfinder.exe"
                      Sleep 3
                      START "" "C:\Ham Radio\DXView\DXView.exe"
                      START "" "C:\Ham Radio\DXKeeper\DXKeeper.exe"
                      Sleep 7
                      START "" "C:\Ham Radio\Commander\CI-V Commander.exe"
                      Sleep 3
                      START C:\MULTIPSK\
                      Sleep 3
                      START "" "C:\Ham Radio\Launcher\Sound.bat"
                      START "" "C:\Ham Radio\QuickMix\QuickMix.exe"
                      EXIT

                      What is MULTIPSK?

                      Note: Sleep is not necessary.

                      squall_01



                        Prodigy

                        Thanked: 80
                        Re: Closing Batch File Window
                        « Reply #15 on: May 27, 2009, 04:05:06 AM »
                        sorry my thoughts must have been partialy else were at the time.  I ment to say that I think were he had his exit wasnt in the right part of it.  In such I could have ms paint exit it would close after I exited paint vs if I some how modified it to be before that.  Still learning myself so I cant say if it would work, was a suggestion.  Also, I ment if you tell them what do they learn all together.  hardly anything.
                        Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                        If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                        Doc16743

                          Topic Starter


                          Rookie

                          Re: Closing Batch File Window
                          « Reply #16 on: May 27, 2009, 05:09:23 AM »
                          Thanks, Carbon. Unfortunately, in the process you posted, the line "START C:\MULTIPSK\" only opens the directory MultiPSK instead of starting multipsk.exe. Also, the batch window still remains open after the batch file is complete.

                          MultiPSK is an amateur radio application used for the reception and transmission of various digital radio formats, such as Radioteletype. The other apps are in support of that, such as Windows volume controls.

                          Thanks


                          START "" "C:\Ham Radio\Pathfinder\Pathfinder.exe"
                          Sleep 3
                          START "" "C:\Ham Radio\DXView\DXView.exe"
                          START "" "C:\Ham Radio\DXKeeper\DXKeeper.exe"
                          Sleep 7
                          START "" "C:\Ham Radio\Commander\CI-V Commander.exe"
                          Sleep 3
                          START C:\MULTIPSK\
                          Sleep 3
                          START "" "C:\Ham Radio\Launcher\Sound.bat"
                          START "" "C:\Ham Radio\QuickMix\QuickMix.exe"
                          EXIT

                          Carbon Dudeoxide

                          • Global Moderator

                          • Mastermind
                          • Thanked: 169
                            • Yes
                            • Yes
                            • Yes
                          • Certifications: List
                          • Experience: Guru
                          • OS: Mac OS
                          Re: Closing Batch File Window
                          « Reply #17 on: May 27, 2009, 05:12:13 AM »
                          It would be Start "" "C:\Multipsk\multipsk.exe" then.

                          Edit the path accordingly. ;)

                          Doc16743

                            Topic Starter


                            Rookie

                            Re: Closing Batch File Window
                            « Reply #18 on: May 27, 2009, 05:30:42 AM »
                            That's what I suspected, and did just that. The batch window still remains open, however.

                            Just tried ending the script with ^C, hoping Control-C might close the window. No such luck.

                            Not the end of the world with the window open - just end up with a lot of stuff cluttering up the task bar!

                            Thanks!

                            Carbon Dudeoxide

                            • Global Moderator

                            • Mastermind
                            • Thanked: 169
                              • Yes
                              • Yes
                              • Yes
                            • Certifications: List
                            • Experience: Guru
                            • OS: Mac OS
                            Re: Closing Batch File Window
                            « Reply #19 on: May 27, 2009, 05:35:15 AM »
                            Can you confirm all 7 programs started successfully?

                            Are you running the commands with @echo on or off? (or simply without @echo on/off)

                            Doc16743

                              Topic Starter


                              Rookie

                              Re: Closing Batch File Window
                              « Reply #20 on: May 27, 2009, 05:43:42 AM »
                              All applications start perfectly. I have no command for echo at all in the script.


                              Carbon Dudeoxide

                              • Global Moderator

                              • Mastermind
                              • Thanked: 169
                                • Yes
                                • Yes
                                • Yes
                              • Certifications: List
                              • Experience: Guru
                              • OS: Mac OS
                              Re: Closing Batch File Window
                              « Reply #21 on: May 27, 2009, 05:46:54 AM »
                              Then you should see the commands in the command prompt window, right?

                              From what you have told me so far, it sounds like one program is not starting, thus making the window hang.

                              Try experimenting with a few of those commands at a time instead of having one batch file for all of them.

                              Doc16743

                                Topic Starter


                                Rookie

                                Re: Closing Batch File Window
                                « Reply #22 on: May 27, 2009, 05:50:23 AM »
                                Yes, I see each command as it executes.

                                I'll experiment and see what I can find.
                                Thanks

                                Helpmeh



                                  Guru

                                • Roar.
                                • Thanked: 123
                                  • Yes
                                  • Yes
                                • Computer: Specs
                                • Experience: Familiar
                                • OS: Windows 8
                                Re: Closing Batch File Window
                                « Reply #23 on: May 27, 2009, 05:54:36 AM »
                                Yes, I see each command as it executes.

                                I'll experiment and see what I can find.
                                Thanks

                                Try adding @echo off to the beginning of your script. Or, adding PAUSE between each line, so you know if there's a problem within your script.
                                Where's MagicSpeed?
                                Quote from: 'matt'
                                He's playing a game called IRL. Great graphics, *censored* gameplay.

                                squall_01



                                  Prodigy

                                  Thanked: 80
                                  Re: Closing Batch File Window
                                  « Reply #24 on: May 27, 2009, 08:30:23 AM »
                                  I should have figured that, sorry about that at least you know it works for the most part.
                                  Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                                  If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                                  Doc16743

                                    Topic Starter


                                    Rookie

                                    Re: Closing Batch File Window
                                    « Reply #25 on: May 28, 2009, 03:27:20 PM »
                                    Problem solved. Apparently the line
                                    START "" "C:\Ham Radio\Launcher\Sound.bat"
                                    was causing the problem. Removing the command to start another batch file and putting the commands from that file into this one allows the window to close now.

                                    Thanks to those that helped.

                                    Thanks, also, to the Department of Sarcasm for the lack of help.