Windows 10: Task Scheduler: How to run more than one program in Actions

  1. Posts : 353
    Windows 10 home 1709/16299.431
       20 Jan 2018 #1

    Task Scheduler: How to run more than one program in Actions

    I have a scheduled task to run Avast AshCmd.exe every day. The entry in Actions is "C:\Program Files\AVAST Software\Avast\ashCmd.exe / @=Quick/r=*~". (Quick is the name of my scan.) I'd like to add another command, to view the Avast log afterwards. Like "Notepad c:\ProgramData\AVAST Software\Avast\report\Quick.txt". (I'll work out the exact grammar later.)

    Is that possible or will I have to wrap the two commands into a batch file?
      My ComputerSystem Spec

  2. Posts : 29,330
    64-bit Windows 10 Pro build 17672
       20 Jan 2018 #2

    Hello mate,

    You can add "&" inbetween the command sets with a space before and after to run both commands in a singe line.

    For example:

    "C:\Program Files\AVAST Software\Avast\ashCmd.exe / @=Quick/r=*~" & "Notepad c:\ProgramData\AVAST Software\Avast\report\Quick.txt"
      My ComputersSystem Spec

  3. Posts : 353
    Windows 10 home 1709/16299.431
    Thread Starter
       21 Jan 2018 #3

    Wow! Guess I missed detailed instructions for TS -- are there any? And where can they be found? Thanks, Brink
      My ComputerSystem Spec

  4. Posts : 29,330
    64-bit Windows 10 Pro build 17672
       21 Jan 2018 #4

    None would include the multiple commands in one command line option.

    Did that work for you?
      My ComputersSystem Spec

  5. Posts : 353
    Windows 10 home 1709/16299.431
    Thread Starter
       21 Jan 2018 #5

    I'll let you know tomorrow. Scheduled to run at 7:00 PM.

    PS Scheduler asked whether I wanted to include the last part as an argument. I said "no" and the line remained with the two commands.
      My ComputerSystem Spec

  6. Posts : 353
    Windows 10 home 1709/16299.431
    Thread Starter
       22 Jan 2018 #6

    Well, I forgot it was Sunday, when I run a more thorough scan. So I attempted to run it manually. It started but froze before it could call cmd. I have a shortcut to the log file, so not a big problem.
      My ComputerSystem Spec


Related Threads
Actions in Task Scheduler in General Support
I have two Scheduled tasks whose actions start the same program, but with different parameters. If these two program instances happen to get scheduled at more or less the same time, then one will wait for the other to finish. But it seems to me...
I cannot get it to work that Windows Task Scheduler closes a program each day. I have added this path C:\Dir Lw C\Programme\Rainlendar - Dirks Kalender (Daten etc.)\RainlendarPro schließen.lnk to a new task and the ink file is containing this...
Task Scheduler doesn't run program in Performance & Maintenance
I'm running a task schedule to run a program at a certain time. It worked great in windows 7 but since I upgraded to 10 nothing happens when the task is run. I've run SFC and Dism see below and no problems found. C:\WINDOWS\system32>sfc /scannow...
Hi, I'm trying to set up a task using Task Scheduler to run a game which is on one of my secondary drives, drive F: - I have Windows 10 installed on the C: drive. The problem I'm having is Task Scheduler doesn't seem able to start a program if...
I have installed Speedfan and it won't run at the windows startup, so I tried to schedule it in task scheduler, I am not familiar with using it and wondered if there is a guide for W10 64 anywhere or if anyone can tell me how? Many thanks in...
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 06:28.
Find Us