A computer restart is required. You must restart this computer before installing SQL Server

Anyone who installs SQL Server frequently must get this all the time.

Shutting down an in use server is rarely an easy option.

I’ve been doing the following hack to get round this since SQL 2008 came out with its new installer, but I never told anyone as I thought bad things could happen and I didn’t want to be responsible. Then the other day I called Microsoft Support about a bug in SQL Server and the MS technician told me to do it to avoid a reboot. Well if it’s good enough for them to tell customers then it good enough for me.

During the SQL install it checks the following registry locations to see if a reboot is required.

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired

PendingFileRenameOperations is a registry value and RebootRequired is a registry key. You can just rename them both to something else. Then after it passes the SQL install check you can put them back.

I’ve done this literally hundreds of times and never had an issue.  I even wrote a simple tool to do it which I keep with my SQL install set to speed up the process. It’s probably rare to install SQL as much as me so just change the registry manually.

 

 

Indesit DI620 Dishwasher Flashing 4 Error PCB Repair C00143206

Indesit_DI620
Indesit DI620

My dishwasher stopped working yesterday. The symptoms were the wash started as normal but then stopped half way through flashing the 4th light. The water wasn’t hot and the soap dispenser hadn’t opened.

Some Googling showed that this is caused by the water not reaching the desired temperature. The dishwasher starts with a 15-20 minute cold wash, then it heats the water and starts the main wash. As the water wasn’t reaching the desired temperature after a certain time it gives up, abandons the wash and flashes the error 4.

There is 3 likely culprits for the water not heating. The heating element, the cut out thermostat and the PCB Timer Module board.

The heating element and thermostat can be accessed by pulling off the black plastic covers on the bottom of the dishwasher. On the right is the heating element connector which can be tested by pulling off the two connectors on the bottom and testing for continuity with a multimeter. Mine was fine showing a few Ohms.

DI620 Thermostat
DI620 Thermostat

To test the thermostat is a bit trickier, it is on the back right side of the dishwasher. You need small arms to get in, disconnect the two connectors then it unscrews. It is supposed to be hand tight but I had to use a spanner to loosen it. Once disconnected test for continuity with a multimeter on the lowest Ohm setting. Mine was fine, to further test it I put it in some boiling water and I heard a audible click after a few seconds, the multimeter then went to 1 showing no continuity. Once it cooled down it went back to reading a few Ohms.

DI620 Timer Module PCB
DI620 Timer Module PCB

This left only the PCB, by reading the white goods forums I had discovered that first of all this dishwasher is a piece of junk and secondly that in this scenario it’s usually the PCB that is broken. Apparently thermostats and old style heating elements rarely break. The bad news is a new PCB Timer Module costs £60-£70!

Someone had mentioned on the forums that they fixed their board by changing a zener diode on the circuit board, unfortunately there was no further details. As it turns out, although I didn’t know it yet, I had exactly the same problem with my PCB. Below is detailed instruction how to test and replace the diode.

On my board there were three visible zener diodes. I decided to test them 1 by 1 with them in the board. To test them properly they should be removed from the circuit, but I was hoping to narrow down the culprit to save me having to remove them all to test.

The broken zener diode
The broken zener diode

In theory there should only be continuity one way on a diode. I tested all three with the black test probe to the line side of the diode, all three had continuity which is correct. I then reversed the test with red to the line side of the diode, two of them reported no continuity, but one of them read about 45 Ohm. I removed the suspect diode and tested it again outside the circuit and confirmed the same readings. This diode was broke.

 

Maplins BZX85C 12V
Maplins BZX85C 12V

On the side of the diode it says C 12 PH. This means it is 12V and Philips. Maplins sell two 12v zener diodes, one is 0.5 watts and the other is 1.3 watts. I went for the higher wattage one BZX85C 12V 1.3W which turned out to be an exact physical size match to the original. After soldering it back in I am happy to say the dishwasher started working perfectly.

The new working zener diode
The new working zener diode

 

 

 

 

 

Parrot CK3100 CK3300 CK3500 DIY Flash Upgrade Programming Cable – TTL Pinout

Ondřej Linhart contacted me after reading my post on creating an upgrade cable for the Parrot CK3000. He has a CK3100 and suspected that it would be possible to create a similar cable for the CK3100 as I had done for the CK3000. This is because the official cable advertised says it works on the Parrot CK3000, CK3000 Evolution, CK3100, CK3300 and CK3500. Below is the combined cable. The small connector on the left is for the CK3000 Evolution, the large connector in the middle is for the CK3100. I don’t know about the rest of the Parrot devices as I do not own them.

Official Parrot Combined Upgrade Cable
Official Combined Upgrade Cable for Parrot CK3000 / CK3000 Evo / CK3100 / CK3300 / CK3500

We had a little discussion over email and a few weeks later I am glad to say he has cracked it and figured out the wiring.

The CK3100 has a different type of connector and different pinouts from the CK3000, but you can still use a USB-TTL device to program it. Ondřej bought this USB-TTL adapter, but pretty much any should do, you can find them on eBay too.

Ondřej also sent me the following images to post here showing the pinout for the CK3100 and also a picture of him using the USB-TTL device

 

Parrot CK3100 TTL Pinout Wiring
CK3100 TTL Pinout

Here is Ondřej using the USB to TTL adapter in his car with a laptop.

Ondřej Linhart programming his Parrot CK3100
Ondřej Linhart programming his Parrot CK3100

Thanks Ondřej for sharing the pinout. If anyone else finds out any pinouts for other Parrot devices please let me know.

CK3000 Evolution DIY Flash Upgrade Programming Cable – TTL Pinout

 Parrot CK3000 Box

 

CK3000 Evolution Release Notes Caption

I recently purchased the CK3000 Evolution car bluetooth hands free kit off eBay for £26, much cheaper than the retail £80. I quickly realised I needed to update the firmware on it as it was quite out of date and the latest 5.25c update from the parrot site fixes issues with Android phones.

CK3000 Evolution Upgrade Cable on Ebay
CK3000 Evolution Upgrade Cable on Ebay

Searching online I could not find the upgrade cable for less than £29. That’s more than I paid for the actual device! Having made my own upgrade\unlock\general hacking cables for devices before I was pretty much certain the upgrade cable would just be a glorified RS232 – TTL converter which I have made in past for free from spare parts. This turned out to be the case.

RS232 To TTL Converter Module on eBay
RS232 To TTL Converter Module on eBay

Making the cables is a bit laborious and I had previously spotted on ebay that you can buy a standard RS232 – TTL converter cable at a silly price. This was the perfect opportunity to give it a go. I bought the cheapest RS232 – TTL Converter on ebay from Hong Kong which only cost £1.79 ($2.91). I could barely post something to another person in the UK for that price, never mind buy the parts! The downside, unfortunately I had to wait 24 days for it to arrive argh!

 

ATX 4 Pin Molex
ATX 4 Pin Molex

As I didn’t know the pinout this was definitely something to be done from the comfort of my own home rather than in the car, so I knew I’d need a 12v power supply. The CK3000 takes its power from a 4 pin square molex connector, exactly the same shape as an ATX motherboard power supply. I had a PC power supply which had died a few months ago so I cut this off and attached it to a 12V DC 3A power supply (the writing on the blue CK3000 control unit says it only requires 300mA so this was more than enough).

Just had a thought… I didn’t check the wiring before I cut it off the PC power supply as I intended to wire it up manually, therefore I don’t know if the parrot and PC PSU 4 pin molex pinout is the same. Make sure you check this if you intend to power it from a PC PSU directly.

With a multimeter it was quickly worked out that pins 2,4,6 are GND; 3,7,10 +12V; 8 +5V. This only left 1,5 & 9 to be either Tx or Rx. The 5v on pin 8 was not enough to power the TTL circuit, I am not sure what it is for. Anyway to cut a long story short here is the pinout below.

CK3000 Evolution Control Box Upgrade Cable Pinout
CK3000 Evolution Control Box Upgrade Cable Pinout

I would be very interested to hear from someone with an official upgrade cable to tell me if that pinout matches theirs. All I know is, this one works…

Previous cables I have made required a 5V Vcc input from the device to power the MAX232/233. Pin 8 on this device didn’t provide enough power for this, but the new TTL Converter I bought took its 5v power supply from a spare USB port. I used the spare Vcc cable to connect pins 9 & 10.

The update process is fairly simple. Connect the TTL device to the blue control box but leave the device unpowered. Load up the Parrot software and wait for it to say XPRAM downloading… Then connect the power and watch it go… I had lots of failed attempts and a few heart stopping moments when I thought I bricked it after it got stuck after wiping the flash.  Thankfully it’s pretty resilient and it still lets you update it in this scenario after restarting the process.

Parrot Software Update Tool

Update: If you own the CK3000, CK3100, CK3300 or CK3500 please see: Parrot CK3100 CK3300 CK3500 DIY Flash Upgrade Programming Cable – TTL Pinout

Android Automated Build Increment

I was looking for a way to automatically update the AndroidManifest.xml android:versionCode & android:versionName with a new build version everytime I compiled a new build.

I wanted to go from:

android:versionCode=”1″ android:versionName =”1.0.0″

to

android:versionCode=”2″ android:versionName =”1.0.1″ then

android:versionCode=”3″ android:versionName =”1.0.2″ etc.

Lots of googling found that there are complicated solutions using Ant, but there wasn’t a simple “do this” solution which took 2 minutes. The best solution I found was a recommendation to script it, so I did in C# .net 2 which was a 5 minute job, so as usual took an hour. So here let me save you an hour. “Do this”:

Download AndroidBuild++

Extract the AndroidBuild++.exe somewhere such as your eclipse workspace.

In Eclipse, right click your Project from the Package Explorer on the left and choose Properties.

Choose Builders on the left.

Click the New button on the right, choose Program and click OK.

The Launch Configuration Properties will appear.  Fill it in with:

Name: “Increment Build Version”

Location: Browse File System and find the AndroidBuild++.exe that you extracted

Arguments: “${build_project}”

Don’t forget the quotes around the ${build_project}

In the Refresh tab tick – Refresh resources on completion & Specific resources

Click the Specify Resources button and choose your AndroidManifest.xml file.

Click OK and that’s it, you are done.

How it works

The Android Documentation for Versioning specifies that the versionCode should just be increased by one everytime there is a new build. This is an internal number just for you, other applications shouldn’t use it. The versionName is visible to other applications and has the format Major.Minor.Point. To me Point just means build and I just increment that value by 1. If you want to update the Major or Minor values, then just do it manually in the manifest. I guess you would do this just before releasing an update on the market.

One thing to watch out for.

If you change the versionName from “2.3.19” to “2.3.0” then when compiled it will become 2.3.1.

Instead change it to “2.3” and it will become “2.3.0”.

Also you will need .net2 installed. Pretty much everyone should have that already.

Here is the source code for the Project in Visual Studio 2010 c# .net 2 AndroidBuild++ Source Code

SQL Server 2008 R2 Setup hangs at SqlEngineConfigAction_install_confignonrc_Cpu64

The short version:

If you get SqlEngineConfigAction_install_confignonrc_Cpu64 error while installing SQL Server 2008 R2 and the detail log says that the last successful command was mofcomp.exe then try restarting the server, uninstall the partially installed sql server and then reinstall.

More detail:

  • Check the log at C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\<datetime>\detail.txt
  • If the last line in the log is something to do with mofcomp.exe then the steps below may help, otherwise unfortunately it’s probably something else.
  • Open an Administrator command prompt and cd to “C:\Program Files\Microsoft SQL Server\MSSQL10_50.<InstanceName>\MSSQL\Binn”
  • run “mofcomp.exe blah.mof” for each mof file in that folder
  • If one of them fails then you know where the SQL Setup is failing.
  • Try rebooting the server and rerunning the mof command that failed.
  • If successfull then uninstall sql server and then reinstall, problem solved.
  • If not successfuly then at least you know you have a WMI issue, google how to repair the WMI and try that until you can get the mof settings stored in the repository. There is no point trying to install SQL again until you have got this working.

The full story on how I found and solved this issue:

I ran across a problem installing SQL Server 2008 R2 Express with Advanced Services on a customers server this week. The server was a Windows Small Business Server 2008 SP2 with all windows updates applied.

I’d actually started to do the install at 11:00pm at night as I do this pretty much every day and have everything setup to install from a batch file with a sqlconfigurationfile, this way I could get straight to work in the morning (haha little did I know this day would be a write off) I kicked it off and went to bed only to wake up to find it still installing, stuck at SqlEngineConfigAction_install_confignonrc_Cpu64. I’m glad I did this overnight otherwise I would have most likely spent a couple of hours looking at this installing… wondering why it was taking so long.

I had no choice but to kill the install and check out the logs. Now killing it was trickier than you’d think. Killing setup100.exe did nothing… I ended up downloading processes explorer from sysinternals and finding setup100.exe had started running mofcomp.exe, killing mofcomp.exe then allowed setup100.exe to fail.

SQL Setup gave the following error:

TITLE: Microsoft SQL Server 2008 R2 Setup
------------------------------
 
The following error has occurred:
 
The MOF compiler could not connect with the WMI server. This is either because of a semantic error such as an incompatibility with the existing WMI repository or an actual error such as the failure of the WMI server to start.
 
For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.50.1600.1&EvtType=0xA60E3551%25400xD3BEBD98%25401211%25401
 
------------------------------
BUTTONS:
 
OK

 

That web page as of today says sorry we don’t know what the issue it.

Unfortunately as it had hung the logs didn’t actually say what it had failed on specifically. All I could see was the last thing in the install that had worked. The last few line of the detail.txt log are below:

2011-06-09 23:29:41 Slp: PerfCounter calling lodctr: 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\perf-MSSQL$SQL2008sqlctr.ini'
2011-06-09 23:29:41 SQLEngine: : Checking Engine checkpoint 'XEventMofFile'
2011-06-09 23:29:41 Slp: Sco: Attempting to set file full path to 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof'
2011-06-09 23:29:41 Slp: Sco: Attempting to normalize directory path 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof'
2011-06-09 23:29:41 Slp: Sco: Attempting to check if file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof' exists
2011-06-09 23:29:41 SQLEngine: : Checking Engine checkpoint 'XEventCompileMofFile'
2011-06-09 23:29:41 SQLEngine: --XEventSetup: Compling MOF file: C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof
2011-06-09 23:29:41 Slp: Sco: Attempting to install MOF file
2011-06-09 23:29:41 Slp: Running: C:\Windows\system32\WBEM\mofcomp.exe "C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof"
2011-06-09 23:29:41 Slp: Microsoft (R) MOF Compiler Version 6.0.6000.16386
2011-06-09 23:29:41 Slp: Copyright (c) Microsoft Corp. 1997-2006. All rights reserved.
2011-06-09 23:29:41 Slp: Parsing MOF file: C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn\xesqlpkg.mof
2011-06-09 23:29:42 Slp: MOF file has been successfully parsed
2011-06-09 23:29:42 Slp: Storing data in the repository...

Through a lot of googling I found out that mofcomp.exe deals with WMI and specifically is used to add security groups for SQL Server. Everytime mofcomp is mentioned with SQL Server on google it seems the problem is WMI is corrupt, there are a few commands you can run to check it and you can also run wmidiag to check it is all working. All these tests I ran said it was fine. Despite this solutions kept saying stop the service, delete the WMI repository folder and restore it. I didn’t particularly want to go down the route of repairing this as it’s a customers server and their IT should really do this, especially if it has the chance to go wrong, which this definitely sounded like it did.

Lets dig deeper…

I decided to run process monitor on the install filtering on mofcomp.exe.

But first to perform the install again I first had to go to add remove programs and uninstall all the bits that had failed to install (everything except management studio). Only then can you reinstall, repair didn’t work I tried that first.

Process monitor showed that mofcomp.exe trying to run this command:

mofcomp.exe xesospkg.mof

I opened an Administrator Command Prompt at:

C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQL2008\MSSQL\Binn

and ran:

mofcomp.exe xesospkg.mof

This resulted in it hanging. Excellent, I now had a way to check if I’d fixed the issue without unsinstalling sql server and then rerunning through the full install which can take an hour or so.

I tried running lots of fixes to WMI found via google, but none of them worked. I tried one which suggested stop and restart the WMI service. I gave it a go, but this resulted in the service getting stuck in the “stopping” state. Fantastic… The only solution now is to restart the service. Well as this was a small business server restarting the server would stop the office from working, so I left this till after hours to restart. It turned out this was a blessing, as restarting the server fixed the issue immediately. I reran the mofcomp.exe command and it stored the data in the repository. I uninstalled and reinstalled and SQL installed perfectly.