06/27/09

Visual Studio 2008 ISO md5 checksum

I had to recover some files from a messed up hard drive - one of those being my ISO for Visual Studio 2008 as downloaded from Microsoft Volume licensing / Software assurance.

The file is nearly 4-gigs - I didn't want to re-download, but Microsoft neglected to share any sort of file hash (like they do on technet downloads)

So I started the download using the Download Manager hoping a checksum would be available in the interface. No dice.

After digging around my hard drive, I found the info file for the download manager at:

C:\Users\\AppData\Roaming\Download Manager\blahblah.dmc
It's your standard microsoft style config with the heading "DLM Recovery Info" (I'd like to point out that this page will soon be the only instance of this phrase on the internets)

And what do you know, it contains a line:
md5=uhuhpt3QyTRBFTr56Tp7Ig==

Now were I more encoding savvy I would have instantly recognized the double equals at the end as a base64 encoded string, but alas, I did not know about this. I converted from base64 -> ascii -> hex, and finally had the good old md5 hash we know and love :)

So here it is:

File name: SW_DVD9_Visual_Studio_Pro_2008_English_Core_MLF_X14-26326.ISO
md5 hash: ba1ba1a6ddd0c93441153af9e93a7b22

Maybe there is some other soul out there with a possible corrupt file who can benefit from this hash. Ok probably not, considering VS 2010 is around the corner, and nobody had posted it before.
06/15/09

Fixing lost data in a data bound control that causes an exception

Vusual Basic .NET 2008 is wonderful. It makes working with databases a breeze (sort of...) Using datasets and databindings, you can create a data driven application with very little hand-written code.

Recently, a user of one of my apps encountered an unhandled error (yeah I know. Whoops.) "The value violates the MaxLength limit of this column" and was allowed to continue or quit. He chose continue, clicked save again, and even though it appeared to save, nothing actually saved.

The exception happened when bindingsource.EndEdit() was called on the table containing the undersized field. Debugging showed that after the error occurs, the underlying datarow is reverted to the pre-modified state.

It doesn't make sense - it might be simple to fix, it might be (probably is) my fault, but nonetheless the internet failed me in finding a solution, so I made one up.

The values that the user had spent hours working on are still in the controls, but the underlying binding source has changed. If we push the changes from all the controls back out to the datarow, saving again will create the error again - as it should.

You push the changes back by calling the WriteValue() function on the data binding for a data bound control ( dataTextBox.DataBindings(0).WriteValue() ). Because I didn't want to hard code anything, I looped through all the controls on the form.

Here is the semi-pseudocode I cludged together to get the app working. Please let me know if there is a better way.


Sub commitChanges()
Try
myBindingSource.EndEdit

Catch ex as Exception
msgbox(ex.message)
updateAllBindings()
End try
End Sub

Sub updateAllBindings()
For Each contr As Control In Me.Controls
For Each cbind as Binding in contr.DataBindings
cbind.WriteValue()
Next cbind
Next contr
End Sub


Note: if you use any containers (tabs, panels, flowlayout) you will probably have to create a separate loop for each subcontainer.



Ideally, the app would warn the user when control is validated, but I guess dataset field restrictions are not pushed to the control (and I'm too lazy to hand update each and every one).

Once again, I find it hard to believe I'm the first person to have this problem...
06/07/09

Boldly going where no one has gone before

I'm testing the process of migration Windows Small Business Server 2003 ( SBS 2003 ) to Windows Essential Business Server 2008 (EBS 2008). While this is a supported process according to MS, "supported" means you can pay MS big money to help you fix your problems. Normally, because Microsoft products are so widely used, the community (aka Google) is of the utmost assistance.

So I'm installing, and I hit an error message. Here, have a screenshot:
DCPromo Error

Inside that log file, we find the following "the directory services safe mode password does not meet the minimum..." which google was able to help with just fine as it relates to SBS 2008: the domain admin password is not complex enough.

Now why in the name of all that is Holy doesn't it just say that? And why didn't Microsoft think - "hey, maybe people's server 2003 password doesn't meet the STRICTER server 2008 password requirements, and we should let them know BEFORE THEY WASTE AN HOUR INSTALLING just to get an erro and have to start over"

When you click cancel, you get a nice error message that tells you:
Really Cancel

Essentially, if I click yes, I am going to have to start over from scratch installing the Management server. If I click no, I have the option of rebooting, and the installer should restart.
I'm not messing around with this, time to ask google!

Google Doesnt Know

I search for "Essential Business Server" "installation tasks have failed". No results.
I try ebs "installation tasks have failed". Same.
...

So am I really the first person to have an error while installing this thing? Why doesn't Microsoft at least have some mention of the phrase?

I am going to have to change the domain admin password, then start over from scratch. This is stupid. If they did any user testing they should have seen this coming and accounted for it.

I swear, Microsoft software only pretends to be easy to use. 1 little error, and GAME OVER, YOU LOSE, NO CONTINUES. It's like a freaking LJN game.



GAAAAAAAHHH!!!

Several hours later, I make it through almost everything, then the installer for system center essentials fails. At thins point, I should just be able to rerun the SCE installer, right? Right??? NO. No, it is going to make me start over... from the beginning. I WAS ON THE LAST STEP!!! Literally. The next step is "Final verification"

Seriously, I'm going to find out who is responsible for this and send him/her a dead fish.

Next time I'm taking a VM snapshot before the SCE installer.
06/04/09

Hyper-V Server 2008 is teh sux

I have spent countless hours over the last week trying to get an image of a small business server 2003 installing working in a virtula environment. I have tried VirtualBox on my laptop. Too crashy. Then I tried vmware workstation on the laptop. Close, but too slow (cpu and disk).

I needed more horsepower and disk throughput, so my PC turned into a dedicated server. First I thought I'd give Vmware ESXi a go, since I've seen it do miracles at work.

Wrong. It pretty much only supports 3 network cards, and if it can't find a network card the installer crashes was a totally nonsensical error.


On to hyper-v server 2008 r2. Considering the bloat, this must support the network card... Well, not out of the box, but I got it working.

Finally, I am on the path to success. I have networking, and get the VMs working, all is going great, until I try to setup internet access for the VM... it doesn't work. After some research, it sounds like Hyper-V prefers the VMs to use a separate NIC. So I go digging, and find a compatible card. Hyper-V Server finds it and installs it.

I go to bind this NIC with an external network and... lose connectivity. On both NICs. A reboot later, and the new NIC is missing.


Now if I could open network settings, I coudl easily fix this. If I could get into device manager, I could fix it too.

But wait, Hyper-V server 2008 doesn't have device manager, and you cannot access netowrk settings apart from ipconfig. Crap.

One other person (that I can find) has had this problem, and the MS support people copied and pasted some useless info that would work... if I wasn't running server core.


Server core is a great idea, but the implementation sucks. Only a very few things can be properly remotely managed, and remote management is a nightmare if you are not in a domain. The command line facilities are overly complex (lookup "winrm"... what a godawful mess), and have no standards. You think linux is bad? Linux is a breeze compared to this.


My only solution is going to be to install server 2008 standard, and deal with the overhead. I'm not happy about it but I have no choice. (I'd REALLY rather use ESXi, but I'm not buying some archaic network card because vmware is too lazy to bundle more than 4 NIC drivers)

I should have been spending this time working on testing the migration from SBS 2003 to EBS 2008. Instead, I have been wrestling with virtualization solutions.
05/26/09

You CAN install Vista, or server 2008 from a hard disk

The internets seem to think that the only way to install Vista or Windows Server 2008 when you don't have a DVD drive is to use a USB hard / flash drive. Even Microsoft seems to think so.

Thankfully, there is one site that has some directions that work! http://1.11011.net/archives/000673.html

I am going to paraphrase based on my experience.

1. Format the hard disk as NTFS.
2. Copy the complete content of the windows install DVD to the hard disk.
3. Start an Elevated command prompt (if you are doing this in vista+), change to the DVD drive (NOT the hard drive as the directions state), and run the folowing:
Note: d: is the DVD drive; x: is the hard drive from which you are planning to install.

d:
cd /boot
bootsect /nt60 x:

You should not get any errors.

(For good measure, I also used diskpart to set the partition as active. bootsect may do the same thing...)

4. Your prep work on the drive is done. Go throw it into the target machine, make sure it is the boot drive, and fire it up! It will boot into the installer. DO NOT go through with the installer - apparently it doesn't work.

5. Choose the repair option, skip the partition selection, and choose command prompt.

Type the following:

c:
cd /boot
move bcd bcd.bak
bcdedit /createstore
cd ../sources
setup


The installer will start up again, over top of the already running installer. This is OK.

6. Go through the installer as normal, with the following notes:
a. After pressing the first Next button, it may hang for a short while - again, this is ok, it will continue.
b. If you get a weird error message while trying to select a destination drive, make sure you partition it first. This should fix the problem.

If you are lucky, you can remove the install drive, and everything will work. If you are like me, windows placed the boot loader on the D: drive instead of the C: drive, so you will get the dreaded "BOOTMGR is missing" error, or simply an error saying that there is no bootable disk. Here's what to do:


Fixing the boot steps (incomplete)

Note: this assumes that your install drive is D:, your destination drive is C:, and that the boot loader was installed on D:

1. Boot into your freshly installed windows.
2. Flag partition as active (this may not be necessary):
a. open an elevated command prompt
b. Run "diskpart"
c. Type "list disk" to get a list of drives
d. Look for the drive that matches the parameters of the C: drive. In my case, it was disk 0, so I typed "sel disk 0"
e. type "list part" to list the partitions. in my case there was only 1, numbered 0, so
f. type "sel part 0"
g. type "active" to flag the partition as bootable
h. type exit to leave
3. Setup boot partition

d:
cd /boot
bootsect /nt60 c:

You will receive an error about locking, but it should be ok.
4. copy over bootmgr

d:
cd \
xcopy /h bootmgr c:\

5. Copy all the unlocked contents of d:\boot to c:\boot

robocopy d:\boot c:\boot /mir /r:0

6. Export the BCD file to the c: drive

bcdedit /export c:\boot\BCD

7. Look through the BCD for any references to D:
This command lists out the boot settings.

bcdedit /store C:\boot\BCD /enum all /v

In my case, three headings were pointing to D: (Windows Boot Manager,Windows Memory Tester, and Windows Legacy OS Loader)
Use the value of the identifier field (yours may be the same) in the following commands to change the copied BCD to point to the C: drive.

bcdedit /store C:\boot\BCD /set {9dea862c-5cdd-4e70-acc1-f32b344d4795} device partition=c:
bcdedit /store C:\boot\BCD /set {b2721d73-1db4-4c62-bf78-c548a880142d} device partition=c:
bcdedit /store C:\boot\BCD /set {466f5a88-0af2-4f76-9038-095b170dc21c} device partition=c:

Note: You may have to replace the value between the curly braces.


You are done. You can now safely remove the install disk, and windows server 2008 (this will also work for Vista, but there are much easier ways to do so there) will boot from your C: drive without the D: drive present.


I used the following post, as well as the poster's resources to come up with this solution: http://forums.techarena.in/vista-help/1026425.htm
05/20/09

Google jumps headfirst onto the hype bandwagon

Google updated it's logo today to commemorate the fact that scientists today are claiming to have found the missing link.
null




Included in this logo is a picture of the fossil Ida - the same picture everybody else is using, of a creatue with a long tail that appears to be standing up. (The fossil was named Darwinius masillae ... because obviously it is scientific to name it after a guy, rather than the animal species it appears to be [hype])


There are some problems with these claims, and I would have expected Google to be a bit more responsible about it:
1. It's a single fossil.
Some amateur archeologists found one single fossil, and the entire scientific community goes nuts. All of the claims being made contradict the fact that they only have one. If it were a transitional species, there would be more than one.

2. It it the size and shape of a lemur.
Most of the photos have the animal appearing to stand upright and with no scale. The thing would have looked like a big rat. There are existing species of animal that appear more transitional.

3. The link is a matter of semantics.
This "missing link" is really the answer to a debate among evolutionary biologists as to where exactly primates developed. The actual science involved is rather complicated and mundane. Instead of spreading facts, the PR machine spreads things like "a discovery that changes everything!," or "finally the missing link is found!". Well, no; no it is not.


Scientists found a single specimen of a fossil that looks like a deformed lemur, and immediately jumped to the conclusion that it not only represents an entire species, but that it is the evolutionary precursor to primates (and therefore humans). Google usually saves the custom logos for historical events or holidays. That I can recall, this is the first time they updated the logo for a current event...


Ida: Superstar fossil or superstar hype?

Ida: the Missing Link at Last?