1.    18 Jul 2017 #1
    Join Date : Sep 2015
    Posts : 291
    Windows 10

    Batch file start program minimized


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

    Code:
    ::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 ComputerSystem Spec
  2.    18 Jul 2017 #2
    Join Date : Aug 2016
    S/E England
    Posts : 4,516
    10 Home x64 (1709) (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 ComputersSystem Spec
  3.    18 Jul 2017 #3
    Join Date : Sep 2015
    Posts : 291
    Windows 10
    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 ComputerSystem Spec

 


Similar Threads
Thread Forum
Solved How To Automaticaly Start A Program Minimized
I have an old programme I like called Desktop Secretary that I am using With Windows 10. Its being run in compatibility mode for Vista SP2. The built in option to run on startup does not work for Win 10 so I am using Task scheduler to make it run...
Software and Apps
Hyper-V Windows 10 Batch file to start/stop VM on command
I am running Hyper-V on Windows 10. I am using the PC for media playback / gaming in big screen and rarely see the desktop. I have an service running and APP on my phone, so i can start batch files and programs without the need for a KB/M. I...
Virtualization
Solved Start a program from a batch file
4 Apps of mine run a batch file that -tries- to call/start and EXE program. These Batch files need to work with OS XP thru Win 10. Win 10 has a pop-up window asking user if its okay to run/execute my EXE. No other Win version does this and thus I...
Software and Apps
Start a program from a batch file
I'm trying to create a batch file that should - call another batch file - start a program and then wait for the program to close - call another batch file My goal with this is to work around an issue in Windows 10 where the screensaver won't...
Software and Apps
Batch file - Unable to start a program minimized
I've been trying to figure this out for a while now and I can't. I've looked at tons of small tips online to get this working but it doesn't work at all. I have a batch file which causes various programs to start when opened. However, one of them...
General Support
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 15:32.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums