MySQL ODBC 5.2.6 Driver for Windows (2008 r2)

I was unable to install the x86 or x64 MySQL ODBC driver (v5.2.6) in my Windows 2008r2 server due to a reported missing module, the exact error was:

“Product: MySQL Connector/ODBC 5.2 — Error 1918.Error installing ODBC driver MySQL ODBC 5.2 ANSI Driver, ODBC error 13: The setup routines for the MySQL ODBC 5.2 ANSI Driver ODBC driver could not be loaded due to system error code 126: The specified module could not be found. (C:Program FilesMySQLConnector ODBC 5.2myodbc5S.dll).. Verify that the file MySQL ODBC 5.2 ANSI Driver exists and that you can access it.”

A little searching turned up a gem from another blogger, copying C:WindowsSystem32msvcr100_clr0400.dll to C:WindowsSystem32msvcr100.dll and then restarting the MySQL driver installation worked a treat!

SOURCE: Thanks to Matt of for his reference in this fix!

EMIS Doctor’s Software Printing Failure

The Doctor’s EMIS software was unable to print to the Brother laserjet printer. It printed fine from Windows and other software.

The problem was with the configuration of the printer from within EMIS. Once the Doctor was logged into the system clicking “Config > Printing ” and then de-selecting the “Select Size” (or similier) check box solved the problem of printing, and adjusting the X/Y alignment corrected the final print.

Windows Automated Installation using WAIK and PXELinux

This will be a rather lengthy initial post describing the process by which I’ve:

  1. Automated the installation of a Windows 7 PC using the WAIK scripted installation method
  2. Captured an image (.wim file) of the Windows 7 installed PC
  3. Injected drivers into the .wim file
  4. Automated the offline injection of Windows updates into the .wim file every month

PXE Windows PE covered in


1. Automated the installation of a Windows 7 PC using the WAIK scripted installation method

The first task was to automate the installation of a Windows 7 PC using an answer file, the WAIK tools enable the creation of such a file and a great guide can be found on technet: 

I used the above article and some other sources online to create a “Autounattend.xml” file <<LINK TBC>> which when dropped onto a USB stick and attached to the target machine allowed automatic installation of Windows 7 Ent SP1 just by booting from the DVD.

This got me into “Audit” mode which is a pre-sysprep mode enabling me to make some basic additions to the machine before imaging.

I first installed the drivers that were missing and then rebooted (automatically returning to “Audit” mode!).

Next is ran the cmd “winsat prepop” which runs the Windows Assessment tool and allows Aero themes to run.

I then changed to the default aero theme and installed the VMWare tools drivers so they don’t nerf physical installations!!!

Finally I created the directory “C:WindowsSetupScripts” and copied my own personalised “SetupComplete.cmd” file which is just a batch file I created to clear the Autounattend.xml files from the system and then execute a registry key deletion by inserting a key that’s copied onto the target machines root C: drive by the PXELinux imaging process and finally to install our package deployment software (WPKG) if required and then to reboot.

If nothing else it’s definitely worth removing the Unattend.xml files used during the automated installation as these could contain delicate information:

del /Q /F c:windowssystem32sysprepunattend.xml
del /Q /F c:windowssystem32syspreppantherunattend.xml
del /Q /F c:windowspantherunattend.xml

The last step is to sysprep the machine specifying the Unattend.xml file you plan to use to deploy the image to your target machine(s).
Note: this is very different to the “audit mode” Autounattend.xml crafted and used to create this initial base image.

The sysprep command I used (after copying Unattend.xml into “C:\Windows\System32\Sysprep” dir was:

C:\windows\system32\sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:"C:\windows\system32\sysprep\unattend.xml"


2.  Capture an image (.wim file) of the Windows 7 installed PC

Booting from the Win 7 PXE image with imagex.exe included now allows imaging of the target machine.

Need to ensure you have suitable media to save disk .wim image to.

imagex is very easy to learn with /? for my project I needed both the Windows 7 SYSTEM partition and the PRIMARY OS partition. so two commands were required:

imagex.exe /capture C: Z:\disk-image-SYSTEM.wim /compress fast /verify "disk-image-SYSTEM"

imagex.exe /capture D: Z:\disk-image-PRIMARY.wim /compress fast /verify "disk-image-PRIMARY"


To continue to tidy up the image after injecting drivers and updates it needs to be re compressed occasionally:


imagex /export “G:\DeploymentShare\Operating Systems\ED\ED.wim” 1 c:\ED.wim /compress maximum