Batch file start program minimized

  1. tcebob's Avatar
    Posts : 481
    Windows 10 pro 1903 1862.145

    Batch file start program minimized

    Here's a little script to make a backup of 2 directories:

    ::can't copy Opera data while Opera is running
    taskkill /im opera.exe
    robocopy c:\all e:\Bobback\All /mir
    robocopy c:\Users\Bob\AppData\Roaming e:\Bobback\Roaming /mir
    ::restart Opera minimized
    start C:\all\Prog\Opera\44.0.2510.1449\opera.exe /min
    It all seems to work OK except the last line which ignores the /min. What have I done wrong?
      My Computer

  2. Bree's Avatar
    Posts : 19,073
    10 Home x64 (20H2) (10 Pro on 2nd pc)

    Type Start /? for its full syntax, but basically it goes...

    START <parameters for start> command <parameters for command>
    So the way you have written it, /min is passed as a parameter for Opera. I presume you meant it to be a parameter for Start, so try...

    START /MIN C:\all\Prog\Opera\44.0.2510.1449\opera.exe
      My Computers

  3. tcebob's Avatar
    Posts : 481
    Windows 10 pro 1903 1862.145
    Thread Starter

    Thanks, Bree. I copied your suggested line and pasted it into a separate bat file. Again, it opened Opera but ignored the /MIN. I can live with opera active so no big problem. But it's odd that it won't take.
      My Computer


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 11:35.
Find Us

Windows 10 Forums