Where does Windows store the settings for Scheduled Tasks console?

前端 未结 3 1551
梦谈多话
梦谈多话 2020-12-28 14:33

I would like to know where Windows stores information for Scheduled Tasks. I would like to be able to find the reference for the name, schedule, or command to run associated

相关标签:
3条回答
  • 2020-12-28 15:18

    I needed to delete some tasks as in a script as the final part of a system build.

    I discovered you can just delete them eg:

    @echo ..Audit hardware
    
    "\\vs-files\General\0000 IT\Bginfo.exe" "\\czwgbak\Software\_Build2015\AuditWorkstation.bgi" /timer:0 /Silent /NOLICPROMPT
    
    @echo delete Scan Setup inis
    
    If not exist %systemroot%\System32\Tasks\ASUS\nul goto reg
    rd %systemroot%\System32\Tasks\ASUS /S /Q
    
    :reg
    

    etc...

    0 讨论(0)
  • 2020-12-28 15:21

    In Windows 7 they are stored in files under "Windows\System32\Tasks". The files are XML, so you could create and edit task files there.

    Other versions of Windows I think they are stored in "%SystemRoot%\Tasks"

    0 讨论(0)
  • 2020-12-28 15:32

    Windows stores scheduled tasks as XML files, AND in the registry.

    You can find them in a few places:

    Filesystem:

    %systemroot%\System32\Tasks
    %systemroot%\Tasks

    Registry:

    HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Taskcache\Tasks
    HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Taskcache\Tree

    Note: You can't edit the XML files directly in \Tasks for security reasons. See here for more information: https://serverfault.com/questions/440496/ok-to-edit-tasks-xml-file-in-c-windows-system32-tasks

    To work with importing the XML files without going through the scheduled task UI you can look at these:

    Schtasks.exe
    Powershell Scheduled Task Cmdlets

    0 讨论(0)
提交回复
热议问题