How to minimize a batch file running at startup via Task Scheduler?

Page 2 of 2 FirstFirst 12

  1. Posts : 42,953
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #11

    Thank you.

    Have you looked at the links I posted in post #2? Your answer is aleady there.

    Here is the screenshot I referred you to using nircmd.
    How to minimize a batch file running at startup via Task Scheduler?-1.jpg

    You can see:
    nircmd on C:
    downloaded from (I will Google this for you and provide a download link to save you doing this):
    NirCmd - Windows command line tool

    Download a copy and put the file on C: as shown in my screenshot.

    Note where your bat file is on your disk- you need the path to it to put into the task scheduler.

    Now open task scheduler and add your task.

    In my screenshot you can see the instruction you need using nircmd, followed by the path to your bat file (after 'hide') which will probably be different to mine.
      My Computers


  2. Posts : 7,606
    Windows 10 Home 20H2
       #12

    Consider using VBScript to run a batch script without a window appearing.

    CreateObject("wscript.shell").Run("""D:\Folder\Subfolder\ABC.bat"""),0

    The "0" at the end will stop a window appearing.

    I use VBScript to start SpeedFan without a CMD window at Windows startup via Task Scheduler.
      My Computer


  3. Posts : 7,606
    Windows 10 Home 20H2
       #13

    The following VBScript will start the app minimized. No batch script is needed.

    CreateObject("wscript.shell").Run("""D:\Folder\Subfolder\App.exe"""),0

    The "0" at the end will minimize it.

    tenmen said:
    I would like to know how to do the same thing via Task Scheduler.
    Use wscript.exe to start the VBScript as shown below:

    How to minimize a batch file running at startup via Task Scheduler?-start-speedfan.jpg
      My Computer


  4. Posts : 5,452
    Windows 11 Home
       #14

    Why do you want to run it via batch, can not you run it as a scheduled task or as a startup with /s switch?
    For the record, I stopped using it, because it did not update some apps for months, something is wrong.
    Attached Thumbnails Attached Thumbnails How to minimize a batch file running at startup via Task Scheduler?-capture_09052021_152146.jpg  
      My Computer


  5. Posts : 5,452
    Windows 11 Home
       #15

    Minimize works only when the app supports it, CMD does not. Maybe run it as a service?
      My Computer


  6. Posts : 107
    Win 10 x 64 bit
    Thread Starter
       #16

    TairikuOkami said:
    Minimize works only when the app supports it, CMD does not. Maybe run it as a service?
    How do I do that?

    - - - Updated - - -

    Matthew Wai said:
    The following VBScript will start the app minimized. No batch script is needed.

    CreateObject("wscript.shell").Run("""D:\Folder\Subfolder\App.exe"""),0

    The "0" at the end will minimize it.


    Use wscript.exe to start the VBScript as shown below:

    How to minimize a batch file running at startup via Task Scheduler?-start-speedfan.jpg
    Thank you so much! It works for me!
      My Computer


  7. Posts : 7,606
    Windows 10 Home 20H2
       #17

    I use VBScript every day. It always works without fail.
      My Computer


  8. Posts : 107
    Win 10 x 64 bit
    Thread Starter
       #18

    TairikuOkami said:
    Why do you want to run it via batch, can not you run it as a scheduled task or as a startup with /s switch?
    For the record, I stopped using it, because it did not update some apps for months, something is wrong.
    Have you asked someone about that issue?
    I made the program to run at startup,but it isn't automatically updating the apps.
    Last edited by tenmen; 07 Sep 2021 at 12:18.
      My Computer


  9. Posts : 5,452
    Windows 11 Home
       #19

    tenmen said:
    I made the program to run at startup,but it isn't automatically updating the apps.
    Is it set to run with admin privileges?

    Create Elevated Shortcut without UAC prompt in Windows 10
      My Computer


  10. Posts : 107
    Win 10 x 64 bit
    Thread Starter
       #20

    TairikuOkami said:
    Is it set to run with admin privileges?

    Create Elevated Shortcut without UAC prompt in Windows 10

    Yes,it is. In Task Scheduler.
      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 19:08.
Find Us




Windows 10 Forums