Windows Home Server Restore Error

For the last month or so, I’ve been using my gaming box as my development machine. With that role come tons of background services which, in turn, eat up memory that could otherwise be used to play games. Luckily, I have Windows Home Server and made a backup prior to the computer’s transformation. However, whenever I attempted to restore the machine using the WHS restore disk, I kept getting a non-descriptive error on the “Enter your WHS password” screen. After some digging (sorry, lost the link), I found that WHS doesn’t play nice with some DHCP-enabled routers. As a workaround, I did the following:

  1. Start up the machine to be restored
  2. Work through the WHS restore process as normal
  3. Upon failing, unplug the router
  4. Click the back button in the WHS restore wizard
  5. Continue the restore process

–Adam

Simple Copy Files & Folders Script in Python

As I’ve mentioned before, I use Microsoft’s Windows Home Server as my home’s central data store. Recently, I upgraded from the trial to the full version. Since I was going to upgrade the installation, I figured that I might as well (slightly) upgrade the server itself. As such, I wanted to copy off the data from the hard drives before doing a format & reinstall of WHS. To do so, I accessed the “hidden” DE folder located on each of my WHS hard drives and copied the data to my local machine. When the data was transferred, I formatted the drive and re-added it to my new WHS install. However, when I started to transfer the data back, I noticed that many folders were scattered across multiple hard drives. Rather than manually merging the folders back together, I decided to write this simple Python script.

[2012-08-14 update: I’ve added a Python 3 compatible script (minor changes needed)]

Python 2

import os
import shutil
sourcePath = r'E:\some\path'
destPath = r'E:\some\other\path'
for root, dirs, files in os.walk(sourcePath):

    #figure out where we're going
    dest = destPath + root.replace(sourcePath, '')

    #if we're in a directory that doesn't exist in the destination folder
    #then create a new folder
    if not os.path.isdir(dest):
        os.mkdir(dest)
        print 'Directory created at: ' + dest

    #loop through all files in the directory
    for f in files:

        #compute current (old) & new file locations
        oldLoc = root + '\\' + f
        newLoc = dest + '\\' + f

        if not os.path.isfile(newLoc):
            try:
                shutil.copy2(oldLoc, newLoc)
                print 'File ' + f + ' copied.'
            except IOError:
                print 'file "' + f + '" already exists'

Python 3

import os
import shutil
sourcePath = r'D:\some\path'
destPath = r'D:\some\other\path'
for root, dirs, files in os.walk(sourcePath):

    #figure out where we're going
    dest = destPath + root.replace(sourcePath, '')
    
    #if we're in a directory that doesn't exist in the destination folder
    #then create a new folder
    if not os.path.isdir(dest):
        os.mkdir(dest)
        print('Directory created at: ' + dest)

    #loop through all files in the directory
    for f in files:

        #compute current (old) & new file locations
        oldLoc = root + '\\' + f
        newLoc = dest + '\\' + f

        if not os.path.isfile(newLoc):
            try:
                shutil.copy2(oldLoc, newLoc)
                print('File ' + f + ' copied.')
            except IOError:
                print('file "' + f + '" already exists')

–Adam

Installer Error 1327 And Windows Home Server

Recently, I’ve been experiencing the joy that is Windows Home Server.  To be short, I’d absolutely recommend WHS to anyone with at least two computers in their house.  Anyway, in an effort to reduce redundancy between my computers, I’ve centralized my “Documents” folder onto my WHS machine.  For the most part, this experience has been awesome.  Anyway, As this posts’ title alludes to, I sometimes get the following error when installing new applications: “Error 1327. Invalid Drive U:/”  My “U” drive happens to be a mapped network share that points to my documents folder.  Apparently, these applications don’t like networks very much!  In order to solve this problem, I’m forced to manually remap all of my shares to a local folder.  Definitely not cool.

–Adam