Archive for Microsoft category
Windows 2008 Server on my MacBook Pro
A troublesome disk (a story for another time) has forced me to reinstall my MacBook Pro and review my Windows partition.
My Boot Camp partition was running Vista Ultimate x86 which felt sluggish, ignored the last 1GB and bugged me with UAC. One Windows update kept failing to install which also prevented SP1 from completing.
Apple’s Boot Camp doesn’t support 64-bit Windows (except on the Mac Pro) and my 64-bit experiences have been unpleasant so far (no Flash for IE x64, limited 64-bit shell extensions, Live! refusing to install, drivers etc.) The increased x64 memory consumption would also be an issue when running in a 1.5GB virtual machine via Parallels or VMware Fusion.
Windows XP was one option but losing IIS7 and DirectX 10 would see me reinstalling Vista within weeks so I decided to try Windows 2008 Server x86.
Boot Camp happily accepted the 2008 Server x86 CD where I chose the BOOTCAMP partition, formatting it as NTFS and electing for a standard installation. The Boot Camp drivers subsequently installed without complaint, all 4GB of RAM was accessible and there are no 64-bit compatibility issues.
Microsoft are giving away 1 year evaluation copies of Windows 2008 Enterprise Server x86 as part of their Heroes Happen Here launch program for Windows 2008, SQL Server 2008 and Visual Studio 2008 if you don’t happen to have an MSDN subscription to hand. There are however a few tweaks you need to do to get a more desktop-like experience:
Install desktop features
Head into Server Manager and Add Features then choose Desktop Experience to install Windows Media Player, Aero etc.
Go into Services and set the Themes service to Automatic and Start it to make themes available and then choose Browse… from the Theme Settings in Personalisation to select %windir%\Resources\Themes\Aero.theme
Install wireless networking
This one had me stumped for a while as I thought my wireless card/drivers weren’t working. The reality is that 2008 Server has wireless networking removed by default so head into Server Manager > Add Features > Wireless LAN Service to install it.
Enabling hibernate
Open a command prompt and enter:
powercfg.exe /hibernate on
Remove annoying shutdown
Head into the registry to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Reliability and change the ShutdownReasonOn DWORD key to 0.
Relaxing local password policy
A controversial change I’m sure but I’d rather choose something complex and unique that will last 90+ days than something memorable every 30. Head into Local Security Policy > Account Policies > Password Policy > Maximum password age and change it to something more reasonable.
Going further
A great guide with screen-shots on additional tweaks for a more workstation-like experience also exists – wish I known about that earlier!
[)amien
Joining the LINQ to SQL team at Microsoft
I’ve been quiet on my blog lately largely because I have been preparing to change job and relocate half-way around the world to Vancouver in the beautiful province of British Columbia (where I spent my 2004 summer holiday).
In February I travelled out to Redmond for three days of interviews (one position grew to two, then three). Having read the Microsoft Jobs Blog I was prepared for long hard days but in reality the process was incredibly enjoyable and exciting.
So much so I wanted to find a desk and move in right then.
With some luck I also found myself at Hanselman’s geek dinner which involved some great discussions and the chance to meet Scott himself, Brad Wilson and Nikhil Kothari who I knew from .NET on-line community as well as some 35 other developers from both within Microsoft and the outside world. It was one fun evening and my thanks go to Scott for kindly driving me back to my hotel in Redmond town centre.
Many white-boards and a few lunches later (including an unexpected one with Phil Haack, Nikhil and two more guys from ASP.NET team – I wish I could remember all the names of the people I met!) I found myself with the hard task of choosing a position.
I settled on a developer role within the LINQ to SQL team starting mid-May and am counting down the days…
[)amien
Visual Studio, Windows Server and SQL Server 2008 launch in Guernsey
The various Heroes Happen Here community events in the UK/USA to celebrate the launch of Visual Studio 2008 etc. made me envious that we don’t get such events and goodies here on the little island of Guernsey so I thought I’d so something about it!
We at the Guernsey Software Developer Forum are hosting a community event in conjunction with Microsoft to celebrate the launch of Visual Studio 2008, Windows Server 2008 and SQL Server 2008.
The event starts at 6:30pm on March 27th (next Thursday) at La Rocquettes hotel in St. Peter Port, Guernsey.
We will be giving away a bunch of goodies including the Heroes Happen Here launch packs with promotional copies of Visual Studio 2008 Standard, Windows 2008 Enterprise Server and SQL Server 2008 Developer as well as demonstrating some of the new features of Visual Studio 2008 and .NET 3.5.

I’m hoping this event will be bigger than normal GSDF events given the cool stuff we are giving away and the interest from non-developers in Windows 2008 and SQL Server 2008 so tell your friends (if you’re in Guernsey of course)
[)amien
DLookup for Excel
I had to do a couple of ad-hoc Excel jobs today and found that whilst Excel has a VLookup function for spreadsheet/ranges it doesn’t have one for databases.
It’s been a while since I touched VBA and Access but the DLookup function was quite useful so here it is for Excel. Read the warnings below before you use it!
Public Function DLookup(expression As String, domain As String, criteria As String, Optional connectionString As String)
Dim con As ADODB.connection
Set con = New ADODB.connection
If IsMissing(connectionString) Then
con.Open "Driver={SQL Server};Server=abc;Database=def;Trusted_Connection=Yes;"
Else
con.Open connectionString
End If
Dim rs As ADODB.Recordset
Dim sql As String
sql = "SELECT TOP 1 " + expression + " FROM " + domain + " WHERE " + criteria
Set rs = con.Execute(sql)
If Not rs.EOF Then DLookup = rs(0)
rs.Close
Set rs = Nothing
con.Close
Set con = Nothing
End Function
Copy and paste the code above into an Excel module and replace the “Driver=… with what you want to be your default connection.
Some examples of use:
To select the Name column from the Customers table where the numeric ID is held in column 2.
=DLookup("Name","Customers","ID=" & A2)
To return Forename and Surname columns joined together with a space from the Contacts table in the crm database using the postcode from column 5
=DLookup("Forname + ' ' + Surname","crm..Contact","PostCode='" & A5 & "'")
To return Description from a Products table held in another connection using a partial like match from column 1:
=DLookup("Description","Products","OrderCode LIKE '" & A1 & "%'", "DSN=SecondaryDSN")
I think you get the idea!
- It only returns the first value of the first row
- DLookup’s are not efficient opening a connection each time it is referenced. This could put a lot of strain on your server.
- DLookup syntax is open-ended and has some attack vectors.
If that doesn’t scare you then give it a shot. As usual no warranty expressed or implied!
[)amien
Microsoft opens Office binary file format specifications
Microsoft have released the binary file format specifications to their Office suite (the XML ones are already published) under their Open Specification Promise.
I am not a lawyer but as far as I understand this means you are free to implement the standards with a promise that Microsoft will not use any patents under its control that are required to implement the specification against you.
Hopefully Apple will now address Keynote’s PowerPoint support bug so exported PPT’s works with Office 2007.
Now that the .NET Framework 3.5 source is available (for reference) and Scott Guthrie (now VP) announcing the MVC framework will be user-buildable and patchable (not redistributable) and include project templates for a number of open-source testing frameworks the future is looking very rosy.
[)amien