Windows 10: How To Automaticaly Start A Program Minimized Solved

Page 2 of 2 FirstFirst 12

  1. Posts : 7,588
    10 Home x64 (1803) (10 Pro on 2nd pc)
       04 Jan 2017 #11

    Chris Nicola said: View Post
    In any case, I have UAC turned off.
    Glad to have helped you get it working. If you had UAC turned off just to try to get this working, I'd turn it back on now. It's there to prevent malware making changes without your permission.
      My ComputersSystem Spec

  2.    04 Jan 2017 #12

    Thanks for the advice. Actually I had it turned off for other reasons. I just turned UAC back on to the default settings and rebooted to test what would happen with Task scheduler and I am not getting any alerts which is fine. Thanks again.

    Kind regards
    Chris
      My ComputerSystem Spec

  3.    08 Nov 2017 #13

    For running the program minimized using the cmd.exe /C start /MIN, the focus of the window still changes since the first cmd.exe is launched in a real window. You can avoid this by using the vbscript with WScript.exe:

    1. Create a .vbs script to the folder/name of your choice, I use startprocess.vbs in my example.
    Code:
    Option ExplicitDim oShell 'WScript.Shell objectDim iOption 'WScript.shell.run visibility option'For iOption, see https://technet.microsoft.com/en-us/library/ee156605.aspxSet oShell = CreateObject("WScript.Shell")If WScript.Arguments.Count >0 Then    If WScript.Arguments.Count > 1 then        iOption = CLng(WScript.Arguments.Item(1))        oShell.run WScript.arguments.item(0), iOption    Else        oShell.run WScript.arguments.item(0)    End IfEnd If
    2. Create launcher for the script to run your program
    wscript.exe /B /NoLogo [path]/startprocess.vbs "your command here with parameters" 7
    e.g. wscript.exe /B /NoLogo "C:\Windows\System32\cmd.exe /C MyStartup.cmd > C:\Temp\MyStartup.log" 7
    Now you can place the launcher to the Windows Task Scheduler (or any other place) and your command with parameters will be run minimized without changing the focus of the windows i.e. your work is not affected by the running process. This is due to the fact that wscript.exe does not create any windows when run with the batch mode with /B option.

    Script does not contain any error handling or other additional stuff.

    What the script does it uses the first argument (if it exist) as a full command line for launching the command and the second parameter as WShell.exec visibility option (Microsoft Windows 2000 Scripting Guide - Running Programs)

    When using with the Windows Task Schedule, you place
    C:\Windows\System32\wscript.exe
    as executable and the rest of the parameters as arguments, in my example
    /B /NoLogo "C:\Windows\System32\cmd.exe /C MyStartup.cmd > C:\Temp\MyStartup.log" 7
      My ComputerSystem Spec

  4.    09 Nov 2017 #14

    Thank you very much for this detailed explanation. Another solution Bree found was to add the argument "/background" in task scheduler.

    Kind regards
    Chris

    Click image for larger version. 

Name:	Desktop%20Secretary%20Task%20Scheduler.JPG 
Views:	22 
Size:	67.7 KB 
ID:	162975
      My ComputerSystem Spec

  5.    09 Nov 2017 #15

    There was a mistake in startup, the actual script was missing from command line:
    When using with the windows Tas Scheduler, you place
    C:\Windows\System32\wscript.exe
    as executable and the rest of the parameters as arguments, in my example
    /B /NoLogo path\startprocess.vbs "C:\Windows\System32\cmd.exe /C MyStartup.cmd" 7

    In the example I initially used the redirection of stdout to a log file (> C:\Temp\Mystartup.log) which is optional of course.

    mananas said: View Post
    When using with the Windows Task Schedule, you place
    C:\Windows\System32\wscript.exe
    as executable and the rest of the parameters as arguments, in my example
    /B /NoLogo "C:\Windows\System32\cmd.exe /C MyStartup.cmd > C:\Temp\MyStartup.log" 7
      My ComputerSystem Spec

  6.    09 Mar 2018 #16

    I want to start a program (Zotero) minimized, so I tried the bat file approach with a single line:

    start /min "C:\Program Files (x86)\Zotero\zotero.exe"

    and it failed to start at all. I went to Command Prompt and tried

    C:
    start /min "Program Files (x86)\Zotero\zotero.exe"

    and, surprise, it didn't work there either! It simply creates and minimizes another C: command prompt window (if I start without the /min, it opens the C: window). The only thing that worked was to navigate to the final directory, and then it started, minimized or not. So the final working bat file is:

    C:
    cd "Program Files (x86)\Zotero"
    start /min zotero.exe

    I tried the same sequence of tests with another program, and the same thing happened.

    I'm happy with the solution, but does anyone have any idea what's going on?

    Cheers!

    Ed
      My ComputerSystem Spec

  7.    09 Mar 2018 #17

    pafnooty said: View Post
    I want to start a program (Zotero) minimized, so I tried the bat
    Cheers!

    Ed
    This is by desing of the start program. Start ["title"] program
    If the first parameter has quotes, it is assumed title.
    Try editing your command to

    start /min "" "Program Files (x86)\Zotero\zotero.exe"
      My ComputerSystem Spec


 
Page 2 of 2 FirstFirst 12

Related Threads
Hello, I want to start an EXE program Minimized, or better yet, hidden (so I don't see its program in the Taskbar) only when the computer comes back from Hibernate. (This EXE file does the command to delete the hiberfil.sys file.) It only runs for a...
Hi, I need Windows 10 to boot directly to a program. Whatever I try .vbs, .bat or just shortcut in Startup folder, it always starts minimized to task bar. When I click on the task bar it gets blown up full screen. Once I turn off the Tablet mode...
Hello Community! I'm trying to get BBC iPlayer downloads to start automagically at 2100 so that it can start downloading Doctor Who. I'd like it to start minimized, but I am unsure how to do so. In addition to this, does anyone know if there...
I recently updated my 4 year old acer laptop to win10. I have a calender program called "windates" I placed a short cut in the system startup folder but the program does not start when I boot up my laptop. I did put a short cut on the desktop which...
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...
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 14:46.
Find Us