Guide: Add “Media Collector” Aggregation Functionality to Windows Home Server 2011

by Alex Kuretz on September 20, 2011 · 13 comments

in Guides

The following is a guest article written by forum member Chuck “chuckcoleman” Coleman and shares his experience putting together a solution in Windows Home Server 2011 to replace the Media Collector feature he missed from the MediaSmart Server. Thank you, Chuck, for sharing your solution!

Several months ago I decided that I was going to upgrade my HP EX495 to WHS 2011. To prepare for the upgrade I increased the ram to 4GB and began reading articles on the process to upgrade a headless system to WHS 2011. During this preparatory phase I remained concerned that WHS 2011 didn’t have natively to it any of the Media Collector functionality I was familiar with as a result of having the HP EX495. I have five PC’s in the house, (mostly Windows 7; some with 32 bit versions of W7 and some with 64 bit versions of W7), and a wife that loves to listen to her iTunes music collection from anywhere in the house. Aggregating the music from all of the PC’s was an important issue for me knowing that I would lose that when I upgraded from the EX495 to WHS 2011. My challenge was to try and figure out how to accomplish this with readily available tools.

After a few weeks of experimentation, I believe I have been successful. My configuration aggregates music from my PC’s, updates the server with changes automatically on a scheduled basis, and integrates with iTunes, Zune and Windows Media Player, all without any user intervention. Here’s how I did it.

I downloaded from the Microsoft download center SyncToy 2.1. SyncToy gets installed on each PC that contains music that you want to aggregate on the WHS server. Microsoft provides both 32 bit and 64 bit versions so be sure to download and install the correct version for each PC based on whether the PC is running 32 bit or 64 bit version of the operating system. On each PC I also mapped the server Music folder to a PC drive letter; drive “M” in my case. Once SyncToy 2.1 is installed, you need to create a Folder Pair on your PC for music. The Folder Pair defines for SyncToy 2.1 what folder on the PC should be “synchronized” on the server. Here’s a screen shot of my SyncToy 2.1:

SyncToy 2.1 offers a couple of options that are worth explaining. The default Action for SyncToy 2.1 is Synchronize. This makes the Left Folder, (your PC), and the Right Folder, (your server), mirror images of each other. In my case, I didn’t want this, (which is also the way HP’s Media Collector works). The implication of keeping it as Synchronize is that when another PC’s music gets aggregated to the server, your PC will wind up with all of its music on your PC’s hard disk. I wanted each PC’s music folder to not be altered but aggregated/copied to the server. SyncToy 2.1 offers two other Actions; Echo and Contribute. In both cases, files are copied from the Left Folder, (your PC), to the Right Folder, (your server), but not the other way – from the server to your PC. The primary distinction between these two Actions is that if you delete a file/song on your PC AND if you pick Contribute, it is NOT deleted from the server. But if you pick Echo, it is deleted. In my case, I picked Echo.

One other option is worth noting in SyncToy 2.1 is you can have SyncToy 2.1 check the file contents of each file. Normally it uses the file name, date and size to determine if a file should be updated. If you check, “Check file contents” in the Change Options section, SyncToy will perform a SHA1 hash against all files. This hash, which is mathematically guaranteed to produce a different value every time the file’s content changes, is used to compare files when determining whether files on both sides of the folder pair are already in sync. Selecting this option will make a SyncToy preview or run take longer, but provides a guarantee that SyncToy will never conclude that two files with the same name, size and date are identical when in fact their contents are different. In my case, I initially had this option on but it seemed like my PC’s processor occupancy increased so I turned it off. Experiment with this and decide for yourself how important it is to make sure a song isn’t duplicated between folders. In my case, it wasn’t a big deal.

Now I needed to get SyncToy 2.1 to run automatically on a regularly scheduled basis. SyncToy’s recommendation is to use Windows Task Scheduler feature. In Windows 7 you will find the Task Scheduler by clicking on Start, Accessories and then System Tools. Start Task Scheduler and then on the right side, click on Create Basic Task. You will get “walked” through a wizard to help you configure each step. The first step is to name the task.

Next on the Task Trigger page, pick the frequency that you want Task Scheduler to run to aggregate your files/songs. I picked, Daily. More on this later.

Then on the Daily page, pick a starting time, (again, more on this later):

On the Action page, pick “Start a program”:

The next page you pick the program to start. Browse to the location of your SyncToy 2.1 program and select it. Leave the two optional fields blank which will cause all of your SyncToy Folder Pairs to run at the same time.

Finally, click on Finish to complete the SyncToy wizard.

You have now configured Windows to run SyncToy which is now configured to copy your music to your server. But, it’s currently configured to only copy it once a day at 10:00 AM in my example. In HP’s Media Collector, you could configure it to do it more frequently. Here’s how to do that.

Go back to Windows and open Task Scheduler. It will look something like this:

Double click on the task you just created shown highlighted in the bottom of the screen. On the next page, right-click on the task and then click on Properties. You will then see:

A couple of points. I checked “Run only when user is logged on” and check “Hidden”. In Configure for:, pick your PC’s operating system.

Go to the Triggers tab and pick Edit.

When you click on Edit, you will see:

In the Advanced settings, check “Repeat task every:” and from the drop-down combo box pick the frequency of how often you want it run. I picked every 1 hour. Then from the “For a duration of:”, I picked Indefinitely. This will cause Task Manager to run every day starting initially at 10:00 AM and every hour thereafter, indefinitely.

When it runs, SyncToy’s job is to figure out if there are any new files/songs on your PC and copy them to your WHS 2011 Music Folder AND by choosing the Echo SyncToy option, if you delete any files/songs on your PC, they will be deleted on the server.

So far, so good. Sit back and wait for the top of the hour to roll around, (or whatever hour you said to start in Task Manager), and watch it work! BUT, whenever it runs, a Windows Command box pops up and that becomes distracting after a while. Granted, it only stays up for the duration of the sync which could be, in my case, 30 or so seconds while SyncToy determines if it needs to add or delete any files/songs.

I didn’t like the Command window popping so I had to figure out how to eliminate it. After searching for solutions, I uncovered a small freeware program that wraps around SyncToy and eliminates the Windows Command window. It works great. I found it here. Click on the Download Link, save it to a folder, unzip it and copy it, (SyncToyHidden.exe), to the same folder where your SyncToy 2.1 program is installed. In my case it is at “C:\Program Files\SyncToy 2.1”. Now, go back to your Task Manger, right click on the task and choose Properties, and go to your Actions tab. Click on Edit and change the program that will run to SyncToyHidden.exe with the /hide /quiet optional arguments as shown below:

Now, whenever Task Manager runs SyncToy, it is completely hidden from view. I have installed and used SyncToyHidden on both my Windows 7 64 bit PC’s as well as Windows 7 32 bit machines.

We’re almost there! Now, my music is being automatically aggregated to my Music folder on my WHS 2011. The one advantage that the HP Media Collector software offered was that you could administer the frequency of the aggregation from a central place. In this case, you would need to go to each PC and change the frequency which I guess could be an advantage if you wanted them to synchronize every 15 minutes on one PC but every 2 hours on another one.

So far, using Microsoft’s Zune software or Windows Media Player, I can play any song that is stored on my WHS 2011 server in its Music folder. In fact, I also have Sonos speakers in my home and I can point the Sonos Desktop software to my WHS 2011 Music folder and it has access to all of our songs. But, what about iTunes? When you used HP’s Media Collector software, it configured iTunes so you saw your server when you opened iTunes and you could play songs saved in your servers Music folders. I now had to figure out how to accomplish this. After more searches, I found an article in WeGotServed. You can read it here. Essentially the article directs you to install Apple’s Bonjour for Windows on your WHS 2011 and then download and install Firefly on your WHS 2011 (both of these were included by HP on the MediaSmart Server). Firefly is an open source media server which connects the pipes between iTunes and a range of devices and operating systems. I had a little trepidation about installing the Windows 2000/XP/Vista 32 bit version on my WHS 2011. I decided to go ahead and haven’t had any problems at all. Now when I open iTunes I see Firefly Media Server as a source.

So, with a little work to find and use tools that are already available, I’ve been able to mostly replicate the functionality I used with HP’s Media Collector software. Every hour when it runs I get my music, my pictures and the text files aggregated to my WHS 2011. The other media is aggregated because I also created Folder Pairs for pictures and some text files that I wanted available from any of my PC’s. I also installed the MediaSmart Server LED Management for Windows Home Server 2011 so my EX495 LEDs function like they did with v1 of WHS. This is described in an earlier post within MediaSmartServer.net. I also installed the Microsoft Windows 7 phone Connector add-in so I now get streaming media, alerts and the status of my home network wherever I am. I’m very pleased with how all of this is configured; it works like a champ and has been totally reliable. I now believe that I have a more robust system with the majority of the key features I used on my v1 system. I hope this is helpful to the loyal group of WHS users.


Article by

I'm Alex Kuretz, and I'm the founder of MediaSmartServer.net. I was the Lead Test and Integration Engineer at HP for the MediaSmart Server until April 2008 when I moved on to other opportunities outside HP. I've kept active in the Windows Home Server community, creating several add-ins and helping users make the most of their Home Servers.


{ 13 comments }

Jim (jam3ohio) September 20, 2011 at 5:15 am

Very nicely done!

James Quintin September 20, 2011 at 2:42 pm

Why don’t you just have everything stored on the server and have all the PC’s itunes/zune/WMP librarys pointed to that? (Ie nothing local)

I treat all my PC’s as a dumb terminal with everything stored and backed up on the server. If a PC dies or needs reinstalling, there is very little data to loose/restore…

JQ

Chuck Coleman September 20, 2011 at 5:45 pm

JQ,

The reason this architecture works in my home is that the five PC’s have their own “owners” and therefore they treat each PC as their own. My wife downloads iTunes songs to her PC and sync’s the songs to her iPad and iPod. However, if she is working in the kitchen and wants to hear something that she downloaded to her PC, it’s available to her through iTunes and it shows up under the Firefly device. This works well for all of us. If any of the PC’s die, no problem. As you probably know, all of the data, media, OS, etc. is backed up every night by WHS 2011 so restoring to a new hard disk is easy. Hope this is helpful.

Chuck

Geoff Coupe September 21, 2011 at 1:27 am

Thanks for this. A very clear and useful guide.

Dominic September 28, 2011 at 5:12 pm

Just a thought. Robocopy scheduled task to run every hour from the whs would allow you to atleast centrally manage the task. Just set it up to grab all the media folders on your pcs. Or try setting up synctoy on the whs instead of each client.

Chuck Coleman September 28, 2011 at 5:38 pm

Dominic,
I’ve never been able to figure out how to use Robocopy and therefore I’m not sure of the benefits of using it. SyncToy works well the way I’m using it. If I want to copy a large number of files I use Microsofts RichCopy 4.0. Also, in the case of RichCopy, I think you would need to map the PC’s folders to a drive letter on the server in order for it to work. You would then need to administer the Scheduler and SyncToy on the server instead of each PC. You would also need to create a folder pair for each PC. I see pluses and minuses on both strategies. Good thought though. Thanks.

William October 2, 2011 at 11:23 am

Chuck,

Great article for those looking to replace this functionality – much appreciated contribution! As I went through the process, I am curious about mapping the drive on the PC vs. folder pairing PC’s music folder with the shared WHS music folder. Is there a specific reason to map?

Chuck Coleman October 2, 2011 at 11:47 am

William,

Thank you for the feedback. I guess old habits are hard to break. Although I haven’t tested it I did create a new Folder Pair with SyncToy by navigating to the WHS 2011 server and not using mapped drives. It looks like it will work without any problems. If you want to add this functionality to your environment, why not try it and then report back here so other users see they have two different options. As a matter of convenience for me, there are a lot of times I’ll open “Computer” on my Windows 7 desktop and I like to see all of my drives with drive letters that make sense to me as far as what’s in the folders: M for Music, V for Video, Q for Quicken backup files, P for Photo’s etc. Hope this helps.

whs February 10, 2012 at 12:47 pm

I did you intentionally show a pic of syntoycmd.exe as the program to select for task manager or was that a typo?

Chuck Coleman February 11, 2012 at 8:09 pm

whs,

I looked over my document that was used to create the article and I didn’t find a picture of synctoycmd.exe used to “select for task manager”. Can you clarify and add more detail on what picture? What was the narrative just before the picture? This will help me answer your question.

Thank you for your interest and your question.

Chuck

whs February 12, 2012 at 9:17 am

In the picture below this text you refer it to as as that. Was that a typo?

“The next page you pick the program to start. Browse to the location of your SyncToy 2.1 program and select it. Leave the two optional fields blank which will cause all of your SyncToy Folder Pairs to run at the same time.”

Chuck Coleman February 12, 2012 at 3:58 pm

I have to apologize if I need my glasses changed but I still don’t find where synctoycmd.exe is assoicated with Task Manager. Task Manager shows you a list of running programs and tasks/threads. In the dialogue box after the test you’ve indicated is part of the wizard to create a new SCHEDULED task using the Task Scheduler application. I haven’t found any typo’s in the steps shown. I hope this helps.

Chuck

Helpful March 18, 2013 at 11:37 pm

Here’s a working link to SyncToyHidden since the author’s blog is no longer available: http://files.zxian.org/software/synctoy/SyncToyHidden.zip

Shout-out to Internet Archive!
03/19/2013

Comments are closed, visit the forums to continue the discussion.

Previous post:

Next post: