Author: Andreas Stenhall

The solution to 0xC004F013: Remove KB941649

Since the first build of Service Pack 1 beta was released I have had major problems installing it on our Vista Enterprise corporate image, with hotfixes, security update and drivers integrated. The problem has been that we have to install Service Pack 1 two times, the first time it will always fail with the error code 0xC004F013 but the second time SP1 would always install without any indication of error. Very annoying as SP1 takes some time to install and as we will be rolling out Vista in the organization it is totally unacceptable to have to install SP1 twice. And who knows what other side effects there might be?

Microsoft and I did some research and I first thought that a patch that is only available for order from Microsoft Support was the cause of the problem. After rebuilding the image without that patch the SP1 installation would still fail with 0xC004F013. Today, back at work after Christmas, I managed to figure out by reading the log files produced from package manager (pkmgr.exe) that KB941946 is the hotfix that causes this SP1 installation problem. And to be accurate it’s version 2 of the patch.

It would be very interesting to learn if anyone else who has a Vista image with patch KB941649-V2 integrated get this error 0xC004F0143 as well when installing Service Pack 1. The problem itself does not lie in SP1 and that is why it has been important to actually and finally get to the bottom of this!

Application compatibility in Windows Vista

Windows Vista contains a nice utility called Program Compatibility Assistant which tracks the applications which might have problems with running in Vista. When you start an application which is detected to have problems with Vista you will be presented with a box like the one below, and the necessary compatiblity settings are automatically applied. In some cases the Program Compatibility Assistant solution to a compatibility problem is to set it to run as in Windows XP with Service Pack 2. What the Program Compatibility Assistant do in my example case is to determine that an application need to start with elevated privileges when using User Account Control. Of course this is a problem when the user running the application is just a standard user as he or she cannot start and use the application.

Compatibility Assistant

Regardless of what the Program Compatibility Assistant do the compatibility settings are stored per user and application in the registry. Have a look at this registry key to manually remove or just to have a look at what compatibility settings have been applied on your computer: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers.

The solution to resolve the problem with running certain applications elevated can in many cases is resolved by turning off User Account Control as a last way out, if you have not already disabled it.

Deployment bug found in Vista RTM

Long time no see! I have lots of things to blog about, I just haven’t had the time to do so lately. Last week though I learnt  about a tricky NetBIOS computer naming bug when deploying Vista using Windows Deployment Services (WDS). As you might know  the NetBIOS computer names cannot be longer than 15 characters and when you in Windows Vista (and all previously released Windows versions as well) change the computer name to a name with more than 15 characters you will get a warning message 
that will look something like the screenshot attached to this post.

Computer name change

When using Windows Deployment Services with the new option “Name and approve” the client before pushing out the image to the client, you can as you might have figured name the computer object in Active Directory and then fully automate the  installation process. In the unattended answer file in the computer name section for deploying Vista we have entered %MACHINENAME% to make sure that the computer name is not randomly generated with a name like LH-XY45YHGKL and to make sure 
that we will not get any questions to answer when deploying automatically.

We have a computer naming standard which obviously sometimes makes the computer name more than 15 characters. The bug is when you name a computer longer than 15 characters during Name and approve in the WDS. Then the unattended installation will fail at the specialize pass, without any particular error message, probably because it wants to show the same error message dialogue as when we are in the GUI version of Vista.

Vista SP1 RC installation error 0x80070059 solution

I still do not know the exact cause of why Vista SP1 RC1 kept failing to install on one of my machines, resulting in error code 0x80070059. However I must thank the Microsoftee Darrell Gorter who lead me to the solution, the simple solution I might add. The solution was simply to copy the file winusb.inf from c:\Windows\system32\DriverStore\FileRepository\winusb.inf_0362a280\winusb.inf to c:\Windows\inf. After copying the winusb.inf file there the Vista SP1 RC1 installation completed with no error codes at all!

Special character in Swedish alphabet causes Vista SP1 RC1 bug

One of the Vista installation bugs (error code 0x80070059) I told you about the other day has gotten a somewhat strange explanation. It seems to be a Swedish alphabet bug with sort order/collation of the “V” and “W” characters. I did some research on the Swedish alphabet and found out an interesting thing. In the Swedish alphabet the letter “W” does not like most other languages alphabets sort after “V”. Instead “V” and “W” are equal and all sortings should be made with the second character, meaning “Windows” will sort before “Voice” and not like in the English language where “Voice” would sort before “Windows”. One learn something every day!

First impressions of Vista SP1 Release Candidate

Yesterday evening/night I tried to install the newly released Windows Vista Service Pack 1 Release Candidate on both my work laptop and my main computer at home. The really great parts are that Microsoft added a progress indicator, which after the second restart in an upgrade scenario now indicate at what stage the installation is. There is unfortunately bad news as well, the installation bug I told you about earlier remain. The bug is that every first installation of SP1 installation fail with the error code 0xC004F013, but the second time it always works to install. Another installation issue is that I cannot install SP1 on my main computer, where SP1 installation fail with error code 0x80070059. Let’s see what Microsoft have to say about this!

Setting Microsoft Update to be default using a script

Windows Update in Windows Vista is wrapped in a regular window in the operating system itself rather than being opened as a web page in Internet Explorer 7. The basics are the same and it is the same underlying components in both Windows Vista and when you run Windows Update in a browser window on for instance Windows XP. Never mind, on a Vista client computer set to connect to a WSUS (Windows Server Update Services) server it will of course always check for updates there. In the Windows Update control panel on a client computer you can however choose to alternatively search for updates on Windows Update. If you deploy other software such as Office 2007 you might want to use Microsoft Update instead of Windows Update, to see if there are other updates available for Office and other Microsoft products, not only Windows.

Windows Update in Windows Vista

The reason why I want to check Microsoft Update manually from time to time us is to regularly check which updates arrive to the various client computers that can be downloaded separately and then integrated into our installation media. Since opting into Microsoft Update require administrative rights on the computers I want to set Microsoft Update somehow automatically and apparently there are still no GPO settings for this, which I find rather strange. After doing some reserach I have found the solution to automatically set that Microsoft Update will be the default instead of Windows Update. The script to add is as follows:

Set ServiceManager = CreateObject(“Microsoft.Update.ServiceManager”)
ServiceManager.ClientApplicationID = “My App”
‘add the Microsoft Update Service, GUID
Set NewUpdateService = ServiceManager.AddService2(“7971f918-a847-4430-9279-4a52d1efe18d”,7,””)

Add this to a startup or login script to make sure Microsoft Update is always default.

Celebrating Vista’s first birthday

Exactly one year ago Windows Vista Gold (RTM) was built and today we celebrate Windows Vista’s first real birthday. Looking back at when Vista was released (November 30th 2006) I can see great improvements in Vista itself, third party drivers and application compability. Still there are a few issues here and there but hopefully all issues will be resolved by Service Pack 1 and in coming drivers.

The most frustrating problem I have right now on my home computers arethat I still experience problems with the wireless network connection not being able to reconnect efter resuming from Sleep. The good news is that the bug has gotten closed with the status “fixed” so there is hope.

My without doubt most frustrating problem with my work laptop is the fact that whenever the domain is not reachable everything you do with the computer takes like 30 seconds, no matter if you start Windows Explorer, right click a file, delete a file etc. That problem lies in the kernel as documented by Mark Russinovich. There is also a problem when browsing web sites with IE7, but only if you type for instance, then it takes forever to load the page and the computer just sits there as if nothing is happening. The workaround for this issue is to append http:// to the address because then the page loads instantly as expected. The latter problems are fixed in SP1, thank you for that Microsoft. Shame that it took a year to fix…

Backing up BitLocker recovery keys to Active Directory

Using BitLocker to encrypt your system partition is a very good option to keep the computer and the data on it secure. Starting with Vista SP1 you will be able to encrypt not only the system partition but all the other partitions as well, offering even better security. When you encrypt a partition with BitLocker a recovery key is automatically generated so that you can recover the data on the computer when necessary. By default you have the choice of printing the recovery key or saving it to a USB stick or a network share.

BitLocker Key Recovery ToolHowever using a group policy setting (Computer Configuration > Administrative Templates > Windows Components > BitLocker Drive Encryption > Turn on BitLocker backup to Active Directory)  you can also backup the recovery key to Active Directory, which is a very good suggestion I must say. If you are running Windows Server 2008 you do not have to anything to get this working but if you would like to use Windows Server 2003 with SP1 or later to backup the BitLocker recovery key you must use scripts provided by Microsoft to extend the schema.

Microsoft also offer a tool called BitLocker Recovery Password Viewer which can be downloaded directly from Microsoft Premier Services. When this tool is installed it introduce another tab in a computer objects Properties called “BitLocker Recovery” where the BitLocker recovery keys are listed for your viewing pleasure in the case of necessary restoration. The only negative part about the tool is that it can only be installed on a Windows XP or Windows Server 2003 computer as it require that you have installed the “Window Server 2003 Administration tools for SP1” on Windows XP to get the control panel for Active Directory Users and Computers.

UPDATE: I forgot to add the link to the page where you can find all the necessary information as well as the “extend schema”-script. Here it is!

Restoring files with “Previous versions” is really easy

Windows Vista contains a built in function that is called “Previous versions” or “Shadow copies” which is based on the Volume Shadow Copy service that also handle System Restore in Windows Vista. As a matter of fact System Restore and Previous versions go hand in hand and a system restore point include “Previous versions”. Previous versions

The “Previous versions” feature means that at any time you can right click a file or folder and choose to open and/or restore the file or folder from an earlier  point in time. The great thing is that both backup copies made from scheduled backup as well as local snapshots of the files are listed when you choose to restore the files and folders.

“Previous versions” will also let you restore files that you have deleted but to be able to do so you have to open the folder in which you originally kept the deleted file. A note to take when restoring files is that if you rename a file and choose to restore an earlier copy using Previous versions you will not find any. The feature “Previous versions” locates previous versions of the file by its file name.

Also be aware of the fact that if you have a dual boot system with both Windows XP and Windows Vista, all  System Restore points (including Previous versions) are lost whenever you boot to Windows XP.

The feature “Previous versions” is unfortunately only available on Windows Vista Business, Enterprise and Ultimate versions of Windows Vista.