Stuff to pimp your Windows Home Server

Hacking Windows Home Server is a blog dedicated to Microsoft's WHS technology. Brought to you by Donavon West, Microsoft MVP and author of LiveGadgets.net and donavon.com I'll also discuss the Hewlett-Packard HP MediaSmart Server EX470, EX475, EX485, EX487, the T7-HSA Tranquil Harmony Home Server and any other new Home Server hardware platforms that arise. You can also call this hacking or hackz. In any case I will show you some cool things to make your Microsoft Windows Home Server even sweeter.

Free Sticker
A blog devoted to getting the most out of your
Windows Home Server by Microsoft MVP Donavon West.

Saturday, June 20, 2009

The Great Windows Home Server Add-In Rip-Off

I woke this morning to see a headline on WeGotServed about a new twitter Add-In for Windows Home Server. As I wrote the popular @WHSTweet Add-In (I think it was the first twitter add-in, but I may be mistaken) I was interested, so I clicked over to read more.

When I got there, I saw a screen shot that looks very familiar. At first I thought it was another review of my @WHSTweet, until I noticed the Remote Control tab. I soon realized that I was not looking at a screen shot of @WHSTweet, but another add-in all together. If you look at the two side-by-side (see above), you will see that the Settings tab is a near word-for-word, feature-for-feature blatant rip off of my UI design! Actually, before I moved things around to accommodate longer words in other languages like French and German, it was a near pixel for pixel match!

They say imitation is the sincerest form of flattery. If that's the case, then KyleWWWW (listed as the "author" of WHS Twit Stat) must love me!

I don't mind that someone else is writing a twitter Add-In for Windows Home Server. That's not the point. But come on! If you're going to rip off someone's UI, at least fix their typo. I haven't looked at the code yet to see if it's all mine too. Actually, I'm not sure I want to at this point. I have more important things to do. If KyleWWWW wants to rip off my code as well, I don't think I have the energy to stop him.

Hold on a second… What is that I see on the @WHSTweet About tab?  A copyright notice? Hmmm…

(Note: The released version of @WHSTweet does not have remote control. That is slated for version 2 as I said in my comments on this blog).

[Read the WeGotServed post] [@WHSTweet post]

Read the entire post, Leave a comment and More...
13 comments (so far). go ahead and add to the noise.

Code: Load the WHS Console in Whatever Language you Choose

 image

This is the first in what I hope is a series of articles on coding for Windows Home Server. In my first article, I'm not coding an Add-In. Instead I'll show you how to load the Windows Home Server Console using any language (or more appropriately stated: Culture) that you desire.

This is of little use for the casual user as the actual console itself (or at least Microsoft's portion) is still in English, but Add-In developers should find this extremely useful. The reason I wrote the loader was that I needed a way to test my twitter Add-In @WHSTweet as I have it translated into German, French and Spanish.

Here is the HP tab of the Windows Home Server Console after I have loaded it in French:

image

Now let's go through just how we build our project. You can also download the complete Visual Studio 2008 solution and follow along at home. But first a word of caution. Whenever messing around with RDPing into your WHS or messing with files in the Windows Home Server folder, you run the risk of messing something up. You my want to do this on a Virtual Machine instead of a production server. Personally I use my production server with all of my important family photos, but my middle name is "Danger". :)

You've been warned, now let's get started:

  1. Load Visual Studio 2008 and create a new C# Windows Application named WHSCultureLoader.
  2. Add a Label with the Text of "Choose a Culture"
  3. Add a ComboBox and change the DropDownStyle to DropDownList.
  4. Add a Button with the Text of "Execute".
  5. Right click on the designer background and select View Code.
  6. Add the following code to Form1 constructor so that it look as follows. What we are doing here is loading the ComboBox with all known Cultures.
    1. public Form1()
    2. {
    3.     InitializeComponent();
    4.     CultureInfo[] ciArray = CultureInfo.GetCultures(CultureTypes.AllCultures);
    5.     foreach (CultureInfo ci in ciArray)
    6.     {
    7.         comboBox1.Items.Add(ci);
    8.     }
    9.     Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentUICulture;
    10.     comboBox1.DisplayMember = "DisplayName";
    11.     comboBox1.SelectedItem = Thread.CurrentThread.CurrentUICulture;
    12. }
  7. Next go back to the Designer and double click on the Execute button. This will create an empty the button1_Click function. Add the code as follows:
    1. private void button1_Click(object sender, EventArgs e)
    2. {
    3.     Form f;
    4.     CultureInfo ci = comboBox1.SelectedItem as CultureInfo;
    5.     Thread.CurrentThread.CurrentUICulture = ci;
    6.     try
    7.     {
    8.         string path = Path.GetDirectoryName(Application.ExecutablePath);
    9.         Assembly a = Assembly.LoadFile(path+"\\HomeServerConsole.exe");
    10.         f = (Form)a.CreateInstance(a.EntryPoint.ReflectedType.FullName);
    11.     }
    12.     catch (Exception ex)
    13.     {
    14.         MessageBox.Show(ex.Message);
    15.         return;
    16.     }
    17.     this.Hide();
    18.     f.KeyPreview = true;
    19.     f.FormClosed += new FormClosedEventHandler(f_FormClosed);
    20.     f.Show();
    21. }
  8. In lines 5 and 6 we set the thread's UI culture to the one selected in our listbox.
  9. Next we load the assembly HomeServerConsole.exe from the same path as WHSCultureLoader.exe executed from.
  10. In line 12 we create an instance of MainForm, the main form in the Windows Home Server Console.
  11. In line 20 we hide our selection form.
  12. In line 22 we specify that the form is to receive key events before they are passed to any controls.
  13. In line 23 we setup a handler so that when the form closes, we exit the application.
  14. And finally in line 24, we show the Windows Home Server Console form.
  15. Here is the code for the close handler.
    1. void f_FormClosed(object sender, FormClosedEventArgs e)
    2. {
    3.     Environment.Exit(0);
    4. }

Now lets test our code. Build the project and copy WHSCultureLoader to the \Program Files\Windows Home Server folder on your WHS. You will need to RDP into your WHS to run this loader. It does NOT run from the client. Launch WHSCultureLoader.exe and you should see our main form.

image

Change the Culture to something like French (France) and click Execute. If a few moments the Windows Home Server Console will load. If you are running on an HP MediaSmart Server, you should notice two things. One is that the HP tab is not the first/leftmost tab loaded. This is due to the fact that the HomeServerConsole.exe.config file was not loaded. This file instructs HomeServerConsole.exe on tab order. Here is the config file that ships with the HP:

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <configuration>
  3.     <appSettings>
  4.       <add key="MediaSmart Server"     value="1" />
  5.     </appSettings>
  6. </configuration>

OK, now that we've gotten completely off track, lets continue. The other thing that you will notice is that any Add-Ins that support French (most notably the HP tab) are actually IN FRENCH! The same goes for German and Spanish or at least that's what HP supports in their standard language pack DLLs that they ship to customers in the United States.

Unfortunately, Microsoft does not ship language DLLs for the Windows Home Server Console itself, so any Microsoft code or Add-In will still be in English (or whatever language that your SKU of Home Server is in).

I hope you have enjoyed my first WHS Coding Series article.

Read the entire post, Leave a comment and More...
1 comments (so far). go ahead and add to the noise.

Friday, June 19, 2009

HP LX195 + 1TB external drive only $374

image

Newegg has a sweet combo deal on the HP LX195 MediaSmart Server. You can get it for only $374 plus free shipping plus they will throw in a Western Digital My Book Essential 1TB USB Hard Drive. This deal is good through 06/25.

Read the entire post, Leave a comment and More...
no comments (yet). why not start the discussion?

Easily Upgrade your Laptop Hard Drive without Missing a Beat

image

Add a Hard Drive to your Windows Home Server

Newegg has a great deal if you are looking to add more hard drive space to your Windows Home Server. Using promo code EMCHDD10A you can take an extra 10% off of any hard drive. My favorite for WHS builds is the Western Digital 1TB green drive. Newegg normally sells it for $84.99, but with the extra 10% off, the price falls to $76.49 (plus free shipping).

But why stop at simply upgrading your server? What about that laptop of yours what's always running out of space or worse yet is making a funny noise like the hard drive seek arm is about to fall off? You know that noise.

Upgrade your Laptop Hard Drive

The 10% off deal is good on all hard drives, even laptop drives. So if that laptop drive is getting a little full, here's what you can do:

  1. Make sure that your laptop is backed up with Windows Home Server.
  2. If you have made changed or added files since your last nightly backup, press the Windows+R keys to bring up the Run dialog and type the following (including quotes) and click OK:
  3. "C:\Program Files\Windows Home Server\BackupEngine.exe" -a -d "Upgrading Hard Drive"

  4. You will see the following from the system tray as your laptop will initiate a backup and incrementally backup any newly changed/added files
    image
  5. If you click on the balloon, you can monitor the backup status:
    image
  6. After the backup is complete, shut down your laptop, unplug it from the AC adapter and remove the battery. You don't want current flowing in your laptop while you are messing with it's internals.
  7. Replace your current laptop drive with something respectable, like the Western Digital Scorpio Blue 500GB drive for only $89 (plus free shipping) or any other suitable drive.
  8. Not all laptops have easily accessible hard drives. With some, you must even remove the keyboard (not an easy task with a laptop). But if you are lucky, yours will have a compartment of the bottom clearly marked "Hard Drive" with arrows pointing to the correct screws. :)
  9. Pop in the disk labeled Home Computer Restore CD into your laptop's optical drive and boot up.
  10. Make sure your laptop is on a hard wired network connection (i.e. not wireless) for the restore.
  11. Follow along with the instruction and your laptop will be restored as good as new, but with a lot more space available.

There is no need to re-install the OS or re-install any applications. You won't even loose important settings. Thanks Windows Home Server.

The 10% off all hard drive offer expires 06/22 so hurry!

Read the entire post, Leave a comment and More...
6 comments (so far). go ahead and add to the noise.

Thursday, June 11, 2009

HP MediaSmart Server LX195 only $329

At Newegg, you can pick up an HP LX195 MediaSmart Server for only $329 plus free shipping after $45 off using promo code SERVER645. This offer expires tomorrow, June 12th so HURRY!

Read the entire post, Leave a comment and More...
no comments (yet). why not start the discussion?

1TB Samsung Hard Drive only $69 at Newegg

image

Newegg regularly has the SAMSUNG EcoGreen F2 1TB drive for $79, but until 06/17/2009 you can get one for only $69.99 (plus get free shipping)! Click here to see this great deal and remember to use promo code EMCLTMM28 at checkout.

I have not personally tried the SAMSUNG drives in any of my builds (have been a WD fan) but with this great deal, I may pick one up.

Read the entire post, Leave a comment and More...
no comments (yet). why not start the discussion?

New @WHSTweet version 1.2 with Direct Message support

@WHSTweet version 1.2 was just released. It supports direct messages (DM) and fixes the bug where tweets go out when you reboot your server. Get the new version at http://whstweet.hshacks.com.

To get notification of early beta versions, follow @WHSTweet on twitter.

Read the entire post, Leave a comment and More...
1 comments (so far). go ahead and add to the noise.