Sunday, July 24, 2011

Gateway and Synctoy Annoyances -- Can't Change Drive Letters or Folder Pairs

I recently installed a second optical drive. Actually, I thought my original had broken when it wouldn't eject any discs, but came to find out that it was just the special right side push buttons of the Gateway DX4300 case that were wearing out. For now, I'll just apply extra pressure on the right or front side until the spring(s) break and/or some part of the plastic push button mechanism breaks and I'll order a replacement.

(Interesting sidebar: you do not need to remove the right side panel on the Gateway DX4300 case to remove the drive. You just need to remove the front case by pushing the tabs on the inside of the case and the drives side out the front after removing the holding screws. There is no support manual describing this little facet unless I missed it in the generic user manual.)

After installing the second optical drive, I notice the drive letters had changed. This does not play well with Microsoft's SyncToy, which I use to synchronize documents, pictures, and so on with an external hard drive for backup purposes (automated using Windows' Task Scheduler). Initially, I found out it was not possible to change folder pairs' locations for a given synchronization entry after it was created (http://social.microsoft.com/Forums/en-US/synctoy/thread/4dc979b2-6a54-4364-85c0-46fca9dd6c2e/). I didn't buy this explanation right away and noticed there was a binary file called SyncToyDirPairs.bin in %localappdata%\microsoft\synctoy\2.0 or %HOMEDRIVE%\Documents and Settings\%USER%\Local Settings\Application Data\Microsoft\SyncToy\2.0 . I wondered if I could at least change the drive letters using a hex editor like Hex Editor Neo (http://www.hhdsoftware.com/). It turned out to be a simple find and replace operation.

I suspect for path modifications you could use a combination of search and replace along with insert commands to make the necessary changes. Of course, it might be simpler to just recreate the folder pair at this point. However, for a drive letter change, the hack is quicker and could be made even better by creating a script to update the file.

I do have to wonder after doing all this if Microsoft ever intends to update SyncToy. The last update was November 2009. If not, it would be nice if they would open-source the software like they do for products like Wix (http://wix.sourceforge.net/).

6 Comments:

Blogger David Jedziniak said...

This article is a huge timesaver!

8:57 PM  
Blogger +John Scott said...

Nice tip. Used a different hex editor but it finally worked. The new path was shorter than the old which caused a new file size. Synctoy didn't work with it until I padded 3 "00" bytes to the end of the new path to make up the diff. Also 00 had to come after 06 06 which always seems to follow 5C ("\" in hex). Don't ask me why but it worked.

6:48 AM  
Blogger +John Scott said...

This comment has been removed by the author.

6:49 AM  
Blogger +John Scott said...

Ok after playing with the .bin file a while I've found that the size doesn't matter. What is important is that it parses properly and the variable's byte count matches the number of characters in the path string. Before the drive letter (or \\ for a net share)will be a hex byte indicating the number of bytes in the path string. In my case it was 11. 11 hex = 17 decimal. My new bin file failed because the new path string only had 14 characters. I changed the 11 to 0E (hex 14) and deleted the 3 "00" bytes I padded with in my previous comment and this worked perfectly.

9:35 AM  
Blogger jml said...

Thank you! I changed my subnet at home and really didn't want to have to recreate all of my folder pairs to accommodate the new IP address of my NAS device.

7:54 PM  
Blogger Xander said...

Thank you! Don't know why it changed -one- of my tasks that transfer N:->K: to H: but left the others untouched.

Great article. Notepad didn't work but Notepad++ did. I assume Notepad changed the formating and lost necessary hidden characters.

9:14 AM  

Post a Comment

<< Home