October 2008

Tuesday, October 14, 2008

Windows Update Errors to KB Article Cross-Reference


This list is hardly definitive, but imagine my surprise when I discovered this cluster of sequential knowledge base articles in the Microsoft KB.  I didn't like my options for searching for them and since my colleagues witnessed a few of these error codes in the past day or so, I thought it was wise to create a quick-reference lists for myself (or anyone else who may read this). If you find one I've missed, please add a comment.

 

 

Windows Version

Error Code

KB Article

2000

XP

Server

2003

Vista

Server

2008

0x643

KB958052

0x80070420

KB958054

0x80070422

KB958043

0x80070490

KB958044

0x80070643

KB958052

0x8007064C

KB958055

0x8007066A

KB958049

0x8007F0DA

KB958050

Ø

Ø

Ø

0x8007F0F4

KB958051

Ø

Ø

0x800B0001

KB958045

0x80200010

KB958047

0x8024000B

KB958040

Ø

Ø

Ø

0x8024002D

KB958041

0x80246002

KB958056

0x80246007

KB958042

0X80248007

KB958046

0x8024D00C

KB958053

0xC80001FE

KB958048

Wednesday, October 1, 2008

Install SteadyState and Enable Disk Protection in one shot!



After 12 years, Microsoft's support for Windows XP ended April 8, 2014. Since there will be no more security updates or technical support for the Windows XP operating system I have removed the transforms file link.

This article remains online for historical purposes only.


Here's the code that I used to install Windows SteadyState v2.5 and enable windows disk protection all in one shot. This took forever to figure out with myself and a colleague doing a significant amount of head scratching.

After Windows installer finishes the SteadyState install (I used a custom transform to skip the WGA validation since an unattended install would always freeze during this process), you need to run the SCTUI.EXE application located in the folder C:\Program Files\Windows SteadyState\. The catch is that if you try and run it from the same script that you ran the installer from, SCTUI will launch and immediately exit without enabling disk protection. The workaround we finally came up with was to have the installer script create a temporary user account that is a member of the local administrators group and execute SCTUI as that user. Ah, but you can't pass a password to RUNAS.EXE you say? That's where cpau from joeware comes in.

With cpau, you can specify both the user id and the password on the command line. The beauty of this is that once SCTUI has been launched you can delete the "temporary" administrator account we created earlier (the one that cpau is using to launch SCTUI) and the process will still run because of the way security contexts work in Windows (note: I have not yet tested this on Vista).

We guessed (correctly) that the SCTUI was somehow sensing that it was being launched from the same parent process as the Windows Installer instance that installed SteadyState. That's where the other benefit of cpau comes in. The process that cpau creates will be in an entire new user context and won't inherit any of the parent process' environment.

Once the installer scripts finish, the system will reboot. Once the system comes back up, you'll have to run the Windows SteadyState management tools to more fully configure Windows Disk Protection if you don't want all disk changes discarded with each boot.

Getting this all going took me 2 scripts, since I wanted to do some tidying up with the second script. Remember to watch out for line-wrap. As always, your mileage may vary, run these scripts at your own risk and always test on non-production systems and have good backups! That said, I cannot spend a significant amount of time supporting these scripts, here they are:

Script 1; GO.CMD:

@ECHO OFF
ECHO Installing SteadyState Components...
MSIEXEC /I SteadyState.msi /qb TRANSFORMS=SteadyState-attempt4.mst /log %TEMP%\SteadyState.Log

:WDP
ECHO About to enable disk protection...
ECHO.
ECHO Please close all running applications and save all settings.
ECHO When the computer reboots after this, all changes made to the
ECHO hard drive will be discarded when the computer is shutdown or
ECHO restarted.
ECHO.
ECHO THIS IS YOUR FINAL WARNING! Press CTRL-C and choose Y to cancel or
PAUSE
NET USER WDPINSTALLER WDP@ss0123 /ADD
NET LOCALGROUP ADMINISTRATORS
WDPINSTALLER /ADD
@START cmd /c wdpenable.bat
Script 2; WDPEnable.BAT:

@ECHO OFF
REM Cleanup the SteadyState installer and any files that
REM contain sensitive account information (like passwords).
DEL /Q *.CMD
DEL /Q *.MSI
DEL /Q *.MST
@cpau -u
WDPINSTALLER -p WDP@ss0123 -ex "C:\Program Files\Windows SteadyState\SCTUI.exe /EnableWDPAndReboot"
REM Once the process has been launched we can safely
REM
delete the installer user account
@NET USER
WDPINSTALLER /DEL
DEL /Q CPAU.EXE
If you want to know more about the transform file I used, send me an email message.

Update (3/18/2009):
Some people have asked me what I used to create the transform (MST) file.  The tool I used is called ORCA, which is included in the Windows SDK Components for Windows Installer Developers, part of the Microsoft® Windows® Software Development Kit. If you’re just looking for the Windows Installer tools (which includes ORCA) and not the full SDK (which can be huge), Microsoft has also released the Windows Installer 4.5 Software Development Kit which is only 7MB.
Update (2/26/2011):

Instead of using ORCA I now prefer InstEd for MSI editing and transform file creation. I have found it to be more stable and far more powerful than ORCA.