Okay so, I think I have found the solution online. I like this better than the previous one because you are not hacking the registry and this solution automates what Microsoft recommends as a fix.
http://support.microsoft.com/kb/968749
To start, download the Windows Installer CleanUp Utility
http://support.microsoft.com/kb/290301
Install it, and in the Program Folder is MsiZap.exe.
The cleanup utility (msicuu.exe) actually calls MsiZap.exe to execute the cleanup.
Add the MsiZap.exe to your install and do an apply install before installing SQL Server.
Then run the .exe with the command line:
T {1A528690-6A2D-4BC5-B143-8C4AE8D19D96}
That should completely replicate Microsoft's recommended solution.
My code is as follows:
Create Folder $COMMONFILES$\\MyProgram
Install Files C:\\Users\\Administrator\\Desktop\\Install Files\\Program Folder\\reg.exe to $COMMONFILES$\\MyProgram
Apply Install
Set Variable OpSys to
Read Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProductName into OpSys
Set Variable OpVersion to
Read Registry Key HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\CSDVersion into OpVersion
if Variable OpSys Equals Microsoft Windows XP
if Variable OpVersion Equals Service Pack 3
Run Program $COMMONFILES$\\MyProgram\\MsiZap.exe T {1A528690-6A2D-4BC5-B143-8C4AE8D19D96} (WAIT)
end
end
[DEFINE WEB MEDIA Microsoft SQL Server Express 2005 with Service Pack 2, Exclude from Build]
Include Script: setupsql2005
I haven't gotten any of these install errors since I started implementing this, but I've only had a few XP SP3 installs, and SQL wasn't always failing on XP SP3 so I'm not 100% sure.
I am very interested to know if this works for everyone. Let me know.