SyncTools for Sysinternals

SyncTools is a meta-tool that keeps a folder on your computer up-to-date with all the latest tools from Sysinternals. Simply pick a folder where you would like to keep the Sysinternals tools and run SyncTools.exe in that folder. It will download all of the tools and check for updates on tools it previously downloaded. Any time Mark Russinovich publishes an updated version or even a completely new tool, simply rerun SyncTools.exe to download it for you.

Using SyncTools

Download SyncTools.exe and copy it to a local folder such as C:\Tools.

The first time you run SyncTools.exe it will download all of the tools.

When new tools or updates are available, simply rerun SyncTools.exe to check for updates and it will download updates as necessary.

A * prefix means it’s a new file while a u prefix mean it’s an update. If there’s a problem with a download then a ! prefix is used and a description hints at the problem.

In the screenshot above, I didn’t have a copy of Autoruns, LiveKd and PsKill were updated, but I left Process Explorer running and SyncTools was not able to update it. The solution is simple: simply close the tool in question and rerun SyncTools and it will try to download the update again.

How it works

I wrote this little tool a few years back as an excuse to use asynchronous WinHTTP and it has served me well. Last night I rewrote it from scratch as I had some new techniques I wanted to explore. This version is simpler, although not quite as fast as it only downloads one file at a time.

The first thing it does is download the Sysinternals directory listing. If SyncTools was previously run it will then check the file signatures from the directory listing with the information from the last run. Only new or updated files will be download.

By default, it ignores the following files either because the web server won’t serve them up anyway or because they just aren’t of any use.

*.sys
*.html
*.cnt
*.scr
*.hlp
*.txt
*.asp
*.aspx

If you would like to tailor this list, simply create a text file in your tools folder called .SyncIgnore and place any file name patterns in it, each on its own line.

Finally, you can use the -u and -d arguments to tweak the tool’s behavior. The -u argument lets you provide an alternative URL and the -d argument lets you specify something other than the current directory to sync to.

SyncTools.exe -d C:\Tools -u http://live.sysinternals.com

Enjoy!

 

53 thoughts on “SyncTools for Sysinternals

  1. Steve Crane

    Interesting. I’ve been doing this differently for some years using a batch file I call sifetch.cmd, that looks like this.

    rem @echo off
    pushd \\live.sysinternals.com\tools
    robocopy /mir . C:\SysInternals
    popd

    Besides the http URL you use, there is also a UNC path to the SysInternals tool. I think their intention was that you can map to it and run infrequently used tools directly from the mapped drive rather than needing to have them all local on your machine. I don’t remember if I saw this somewhere or figured it out myself, but here’s how it works.

    The pushd command can be used to change directly to a UNC path, in which case it creates a drive map first before changing to it. I make use of that to map the SysInternals UNC path and make it the current directory. Then I run robocopy with the mirroring switch so new or updated files are copied from the mapped drive to my SysInternals folder, and any obsolete files that SysInternals have removed are deleted from my SysInternals folder. Finally I call popd, which restores the previous current drive and path and additionally unmaps the drive if the current directory is root of a mapped drive that was mapped by pushd.

    The cherry on top is that the C:\SysInternals folder on each of my work desktop, home desktop and laptop machines is a junction point to a SysInternals folder in my DropBox; So wherever I am and see notification of SysInternals changes come up in their RSS feed, I run my batch file and the latest files automatically become available on all three of my machines.

    Reply
    1. Steve Crane

      An added benefit of my method is that the UNC path folder only contains the actual EXE, CHM help files and any supporting files so there is no need to filter out the other files that you need to.

      Reply
    2. Don Parker

      I love the simplicity and the “out of the boxness”. vs custom code. Unfortunately, I found the mapping of the external drive and execution of the robocopy command to be extremely slow. While I appreciate the elegance of only updating what is needed, I find I could download the who SI Suite archive and unpack it faster. So, I think I will stick to “brute force” for interactive updates, but I will look into scheduling the execution of the script on a weekly basis in “off hours”. Regardless, robocopy alone was worth the price of admission! Never heard of it before, but I like it. Thanks!

      BTW – on my system I put a shortcut for procexp in my Startup Folder (modifying the target command of the shortcut to add /p:r /t – run it at real time priority and start it minimized in the system tray). If others do this, they will find they need to stop procexp before every getting an update via this script (if run interactively) since the executable is always in use and the system will not allow it to be deleted/overwritten.

      Reply
      1. Kenny Kerr Post author

        SyncTools avoids many of the problems with the batch file approach. It’s certainly a lot faster than using robocopy, at least in my experience.

  2. Miles B.

    A better tool: WSCC. It not only will keep Sysinternals synch’d but NirSoft as well – AND it will bundle access to the Windows tools – all in a nice GUI. You don’t even need to know what tool you’re looking for – you can search the tools by keywords and get descriptions for each one – THEN run the tool. Nothing to install – run it from a flash drive, and keep it in your recovery tool kit.

    Reply
  3. Kenny Kerr Post author

    Obviously, there are many ways to solve this problem. I wrote SyncTools in the spirit of Sysinternals. In other words, it works and feels like the other command line tools Mark Russinovich has released.

    Steve Crane prefers a clever little batch file. John Robbins has a PowerShell script. I like SyncTools, and had fun writing it.

    Reply
  4. Frank Lee

    Looks like a useful program. On Win XP, SP3, I get “SyncTools.exe is not a valid Win32 application.” Puzzling.

    Reply
    1. Frank Lee

      I switched to my Win 7 machine where it works perfectly. Does exactly what it says on the tin! Thanks for a useful little utility. I’ve wanted something like this for some time, but been too lazy to write it. :-( Nice of you to make it available.

      Reply
  5. PavelS

    When I run SyncTools.exe from cmd, I receive an error: “SyncTools,exe is not a valid Win32 application.”
    I’m using Windows XP. Could it be the problem?

    Reply
  6. sba

    I have a MKS Korn Shell script that performs the same action, by retrieving http://download.sysinternals.com/files/SysinternalsSuite.zip and extracting files that are newer in the zipfile.

    Today it found that no update were needed, whereas Synctools wanted to update… everything.

    Seems to me there’s a bug in the logic that determines the last modified time of files at http://live.sysinternals.com. Maybe related to the fact our corporate infrastructure is using a proxy to connect to the Internet?

    Reply
      1. sba

        That was our guess after some experimentation. IMVHO it would be better to check and set the local files’ timestamps. I personally prefer having the date the tool was updated by the Sysinternals guys rather than the date the tool was downloaded. What do you think?

      2. Kenny Kerr Post author

        Ah but you don’t realize how simple SyncTools really is. :) All it does is download and parse the HTML. It uses the date+size for each link from the HTML as the “signature”. Whenever that changes, it assumes there’s an update. It’s a low-tech solution since Sysinternals doesn’t publish more detailed metadata. However, I like your suggestion!

      3. sba

        So you can easily change the last-modified timestamps of the files you write to disk to match the live.sysinternals.com timestamps, can’t you?

  7. Henry Minute

    Thanks for this tool. Certainly makes keeping SysInternals up to date easier.

    All I have to do now is remember to use it.

    Reply
  8. Gert-Jan

    (had some trouble posting this, so sorry if it shows up multiple times)

    Good to see a tool that works out-of-the-box with our internet proxy server that requires authentication.

    SyncTools did download 82 out of 85 files, but I consistently get the following errors for the remaining 3. I did try it a couple times the last few hours, but it fails every time:

    SyncTools for Sysinternals. Copyright (c) 2013 Kenny Kerr

    82 files are up to date
    3 new files to download

    ! psexec.exe > web error:
    ! Psinfo.exe > web error:
    ! ZoomIt.exe > web error:

    What could this be? (and is there some error message missing after the “:” ?)

    Reply
    1. Kenny Kerr Post author

      It defers to Internet Explorer to perform the downloads – that’s how it picks up your proxy settings.

      A “web error” is when IE informs me that it failed to download a particular file. Unfortunately, IE doesn’t always provide very helpful error information through its API. There should be a descriptive error message following the colon though.

      I’m curious why these three would fail while the rest succeeded. You can try running Fiddler in the background to see what is happening. Let me know.

      Reply
      1. Gert-Jan

        Thanks to Fiddler I found the explanation:

        Turns out our McAfee Web/WebWasher gateway returns an error for these files:

        Request Blocked by URL Filter Database

        Your request to URL “http://live.sysinternals.com/psexec.exe” has been blocked by the Webwasher URL Filter Database. The URL is listed under categories (Malicious Sites), which are not allowed by your administrator at this time. The following reputation level was assigned to it: Malicious.

        It only blocks the requests for psexec.exe, Psinfo.exe, and ZoomIt.exe, but I can download all the other tools just fine. Beats me why only these three tools are considered “malicious”.

  9. Glen Self

    C:\tools>synctools
    SyncTools for Sysinternals. Copyright (c) 2013 Kenny Kerr

    web error: Access is denied.

    Since there is no source code I can’t begin to troubleshoot. Nice idea though

    Reply
  10. Timothy

    Loving this simple tool. A suggestion: include the information about what -u and -d do when you do -?. I know I will forget in the future and be searching frantically for this website. lol.

    Reply
  11. Glen Self

    So, as suspected the proxy is blocking synctools. From above you said that it was using IE so I started IE and entered the credentials for the proxy. In IE I can get to the regular sysinternals page and the live.sysinternals page but still get access denied from synctools

    Reply
      1. sba

        AFAIK this can work only if IE uses SSO for the proxy authentication — our case now, but was not the case in the past–, so it doesn’t really store the credentials it just uses the logon credentials. I don’t think you can do a system-wide “remember [proxy] credentials” in IE if you don’t use SSO.

      2. Kenny Kerr Post author

        Yes, I just verified this with an authenticating proxy and it appears that you are right. Authenticating web proxies that don’t use SSO are a nuisance.

      3. sba

        That’s why we got SSO implemented. But then you need to have apps that correctly support SSO ;-)

  12. Glen Self

    That appears to be what we have. The only automatically update-able programs that work are the ones that let me store proxy credentials.

    Reply
  13. SAinCA

    Windows Server 2003 please…? Same error as on Win XP. Sadness pervades :-(

    Thanks for the simple utility – I was tired of managing each server’s versions manually…

    Reply
  14. Armin

    thank you, this is great.

    the only suggestion I would have regarding files which can’t be updated because the tool may be open is to have something like taskkill.exe sweep the system for any of the running processes for Sysinternals requiring updates and kill it before it updates the file.

    this could either be the default mechanism in your .exe or a cmd line switch to “force” updates

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s