Trying to figure out where the output of a long running scheduled task is being saved. Presumably, it's in the working directory of the task. Unfortunately, the "Start in" option was not set.

The scheduled task is using the "System" account.

Any ideas?

  • That question is about the configuration files. I am looking for the output of a command that's a scheduled tasks which would be saved in the working directory. Modified the question to be clearer. – Belmin Fernandez Jul 2 '14 at 19:00
  • Ah right, vote retracted – squillman Jul 2 '14 at 19:02
  • Probably %Windows%\system32 ... create a test file to verify? – HopelessN00b Jul 2 '14 at 19:05
  • What application/command is your scheduled task running? – Brad Bouchard Jul 2 '14 at 19:21
  • It's a powershell command that outputs into the current working directory. I would create a script and test it myself but don't have access to a non production server right now. – Belmin Fernandez Jul 2 '14 at 19:39

The default working directory for a scheduled task running as the Local System account is


Source: I just tested it by making a scheduled task, running as SYSTEM, that executed a batch file. The batch file contained the line ipconfig > test123.txt. When the scheduled task is run, the test123.txt file appears in the Windows\System32 directory.

Secondly, I created another task, also running as SYSTEM, but this time the executable was set to C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe and the argument supplied was C:\Users\Ryan\Desktop\test.ps1. So basically, the scheduled task was configured to run the test.ps1 Powershell script. In the Powershell script, was the line ipconfig | Out-File .\test123.txt.

The test123.txt file once again appeared in my system32 directory when the scheduled task was run.

| improve this answer | |
  • 3
    Yep...to expand, I believe it defaults to the running user's %USERPROFILE%. As SYSTEM, that's the system32 folder. – Nathan C Jul 2 '14 at 19:58
  • Funny. On 2008R2, my default is C:\Windows\SystemWOW64. – kevin Oct 15 '18 at 1:42

The default working directory for a scheduled task in windows 10, running as the Current User account is %userprofile%\appdata\local\VirtualStore\Windows\SysWOW64.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.