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

Author Topic: Start a program in Minimized window from batch file?  (Read 56473 times)

0 Members and 1 Guest are viewing this topic.

DoctorJellybean

    Topic Starter


    Rookie

    Start a program in Minimized window from batch file?
    « on: August 14, 2008, 05:36:14 AM »
    This is my batch file:

    Code: [Select]
    @echo off
    start "" "C:\Program Files\Windows Live\Messenger\msnmsgr.exe"
    ping -n 6 127.0.0.1 >NUL
    start "" "C:\Program Files\Mozilla Firefox\firefox.exe"
    ping -n 11 127.0.0.1 >NUL
    start "" "C:\Program Files\Mozilla Thunderbird\thunderbird.exe"

    It works great, except that I would like the first program to start minimized. I've tried

    Code: [Select]
    start /MIN "" "C:\Program Files\Windows Live\Messenger\msnmsgr.exe"
    but that doesn't work. Is it possible at all?

    Thanks.

    fireballs



      Apprentice

    • Code:Terminal
    • Thanked: 3
      Re: Start a program in Minimized window from batch file?
      « Reply #1 on: August 14, 2008, 01:17:26 PM »
      When you say it doesn't work, what exactly happens. Also what are the first quotation marks for? If you try...
      Code: [Select]
      start /min "C:\program files\Windows Live\Messenger\msnmsgr.exe" Also when i tried to run another batch program it didn't like the quotation marks around the address, you my have to make a shortcut to an address that doesn't require quotation marks around it and then run that. hope that helps

      FB
      Next time google it.

      DoctorJellybean

        Topic Starter


        Rookie

        Re: Start a program in Minimized window from batch file?
        « Reply #2 on: August 14, 2008, 01:33:36 PM »
        No idea what the first quotation marks are for lol. I was given the code on this post:

        http://www.computerhope.com/forum/index.php/topic,62393.0.html

        As for what happened when I tried my code, it started up in normal mode, not minimized. Using your example, it just opened a DOS prompt window. Using the first quotation marks, it starts the program called.

        fireballs



          Apprentice

        • Code:Terminal
        • Thanked: 3
          Re: Start a program in Minimized window from batch file?
          « Reply #3 on: August 14, 2008, 01:43:44 PM »
          so it now works then?

          FB
          Next time google it.

          DoctorJellybean

            Topic Starter


            Rookie

            Re: Start a program in Minimized window from batch file?
            « Reply #4 on: August 14, 2008, 01:52:07 PM »
            Sorry for confusion, but no. I meant if using the original code with double quotation marks, it starts the program, Take it away, and it opens a DOS window. If I add the /min to the original code, it has no effect and the program starts in normal mode. Maybe there are command line switches for the program I want to start minimized, must Google.

            fireballs



              Apprentice

            • Code:Terminal
            • Thanked: 3
              Re: Start a program in Minimized window from batch file?
              « Reply #5 on: August 14, 2008, 02:05:43 PM »
              I think it's something to do with using quotation marks around the address (found out the first set of quotation marks in to add a title) try creating a shortcut in c:\users\public and rename it without the " - shortcut" after it so you would have the file c:\users\public\msnmsgr.exe (which  is a shortcut to msn messenger) and your ode would look like:

              Code: [Select]
                start /min c:\users\public\msnmsgr.exe
              i reckon that should work

              FB
              Next time google it.

              Sidewinder



                Guru

                Thanked: 139
              • Experience: Familiar
              • OS: Windows 10
              Re: Start a program in Minimized window from batch file?
              « Reply #6 on: August 14, 2008, 04:56:37 PM »
              Quote
              The "" is required if the path and the file name of the started file needs to be quoted. (ex: start "" "C:\Documents and Settings\Compaq_Owner\My Documents\Perl\us.jpg")

              The "" is not required if the path and file name of the started file does not need to be quoted. (ex: start c:\temp\us.jpg)

              The parser cannot distinguish the window title and the started file in this example: start "C:\Documents and Settings\Compaq_Owner\My Documents\Perl\us.jpg"

              The first set of quotes are the new window title. You can actually put a literal in there!

              Quote
              Maybe there are command line switches for the program I want to start minimized, must Google

              Didn't find anything about running minimized, but found some switches for opening into a particular status:

              msnmsgr.exe /status:Online
              msnmsgr.exe /status:Busy
              msnmsgr.exe /status:BeRightBack
              msnmsgr.exe /status:Away
              msnmsgr.exe /status:InACall
              msnmsgr.exe /status:OutToLunch
              msnmsgr.exe /status:AppearOffline

               8)
              The true sign of intelligence is not knowledge but imagination.

              -- Albert Einstein

              DoctorJellybean

                Topic Starter


                Rookie

                Re: Start a program in Minimized window from batch file?
                « Reply #7 on: August 15, 2008, 12:43:02 AM »
                Messenger has an option not to show the main window if it automatcally starts when Windows loads. As I prefer to start it manually, I unchecked that option, which also disables the hide main window option. Hence the need to start it minimized from a batch file, which doesn't seem possible. Thanks for all the advice, guess I have to use it as is.

                fletcjas



                  Starter

                  • Experience: Experienced
                  • OS: Windows XP
                  Re: Start a program in Minimized window from batch file?
                  « Reply #8 on: April 09, 2014, 02:49:25 PM »
                  What if I wanted to open Outlook? That doesn't have an option in the settings? thanks

                  Salmon Trout

                  • Guest
                  Re: Start a program in Minimized window from batch file?
                  « Reply #9 on: April 09, 2014, 02:54:29 PM »
                  What if I wanted to open Outlook? That doesn't have an option in the settings? thanks

                  This is an 8 year old thread! Start a new one.