open program minimized via command prompt

后端 未结 8 637
时光取名叫无心
时光取名叫无心 2020-12-08 13:16

I have a windows 8.1 machine and I want to open a program with minimized window. For a program like notepad, I just use the following command:

start /min \"\         


        
相关标签:
8条回答
  • 2020-12-08 13:37

    You could try using the third-party tool called NirCmd. It is a genuine, free command line utility. If or when you have it, use this code in a batch file:

    title Open Word
    nircmd win hide title "Open Word"
    start "C:\Program" "Files" "(x86)\Microsoft" "Office\Office12\WINWORD.exe
    nircmd wait 20
    nircmd win min foreground
    exit
    

    This program, in order, changes its title, hides itself according to its title, starts Word, waits 20 milliseconds as a buffer for Word to settle, minimizes Word by assuming it is now the top window, and then exits itself. This program should work as intended as long as their are no key presses or clicks in that ~50 millisecond time window, which shouldn't be hard.

    As for installing nircmd on your computer, use this link, and click "Download NirCmd" at the bottom of the page. Save the .zip folder to a normal directory (like "My Documents"), extract it, and copy "nircmd.exe" to %systemroot%\system32, and there you go. Now you have nircmd included with your command line utilities.

    0 讨论(0)
  • 2020-12-08 13:40

    Local Windows 10 ActiveMQ server :

    @echo off
    start /min "" "C:\Install\apache-activemq\5.15.10\bin\win64\activemq.bat" start
    
    0 讨论(0)
  • 2020-12-08 13:43

    Try this

    1. Go to the properties of the shortcut that points to the program (ALT ENTER or right click->properties); if there is no shortcut to it, you can make it by dragging and dropping the program while holding CTRL SHIFT;

    2. Click in the Normal window dropdown, and choose minimized;

    3. Save and run the shortcut.

    0 讨论(0)
  • 2020-12-08 13:49

    Try:

    start  "" "C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE" --new-window/min
    

    I had the same problem, but I was trying to open chrome.exe maximized. If I put the /min anywhere else in the command line, like before or after the empty title, it was ignored.

    0 讨论(0)
  • 2020-12-08 13:55

    If the application is already open (even in background), it will be restored by "start" command. Exit the program if running then /max or /min will work

    0 讨论(0)
  • 2020-12-08 13:56

    I tried this commands in my PC.It is working fine....

    To open notepad in minimized mode:

    start /min "" "C:\Windows\notepad.exe"

    To open MS word in minimized mode:

    start /min "" "C:\Program Files\Microsoft Office\Office14\WINWORD.EXE"

    0 讨论(0)
提交回复
热议问题