Using Schtasks.exe to Create a Scheduled Task to Download the Sysinternals Tools

Using Schtasks.exe to Create a Scheduled Task to Download the Sysinternals Tools

Sysinternals tools have historically been updated with enough frequency that it can be beneficial to periodically check for newer versions.

You can use the Schtasks.exe command-line tool that is included in Windows to create a scheduled task to download the latest Sysinternals tools automatically so the latest versions are always available locally.

This method uses the \\live.sysinternals.com\tools WebDAV share to do an xcopy of the tools. This requires the Webclient service be started, and on Windows server versions, Webclient is only available if you have first installed the Desktop Experience feature.

schtasks /create /ru %userdomain%\%username% /rp * /sc weekly /d sun /st 03:00 /tn "Get Sysinternals" /tr "cmd.exe /c md c:\tools & xcopy.exe \\live.sysinternals.com\tools c:\tools /y && xcopy.exe \\live.sysinternals.com\windowsinternals c:\tools /y"


Using Schtasks to run the task and check its status

You can manually run the task on demand from the command-line with the following command:

schtasks /run /tn "get sysinternals"

Then to check its status while it is running, use:

schtasks /query /tn "get sysinternals"



Other Languages


 

Sort by: Published Date | Most Recent | Most Useful
Comments
Page 1 of 1 (2 items)