Henry 的个人资料Utterances on Software E...照片日志列表 工具 帮助
6月14日

Windows failed to install the following update with error 0x80070643: Microsoft SQL Server 2005 Service Pack 2 (KB 921896)

Those dreaded Tuesdays. Patchday. Can't avoid them forever.

Must. Install. Reboot. Hope.

Bang: Windows Server 2003 Service Pack 2

Bang: SQL Server 2005 Service Pack 2

Bang: Visual Studio 2005 Service Pack 1 (because SQL Server Business Intelligence Studio really is Visual Studio 2005 in disguise)

... and aren't there tons of Critical Patch Updates for Unbreakable Oracle as well?

... and the Google Toolbar spreaders: Adobe Reader and Java Runtime?

Gigabytes.

And then the hoping. Although, you know it's going to happen.

Puff, one of them updates fail. SQL Server. Not patched. Not starting. Unknown state. Windows Update Error Code: 0x7342 - that's not helping.

Waiting for SP3 is tempting, considering the mess that is SP2. But, THEY need the databases. THEY have rights, too.

Maybe, there's something in the Application EventLog. Indeed:

Product: Microsoft SQL Server 2005 - Update 'Service Pack 2 for SQL Server Database Services 2005 ENU (KB921896)' could not be installed. Error code 1603. Additional information is available in the log file C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB921896_sqlrun_sql.msp.log.

Error code 1603 - Windows Installer's way of saying "Som'thn gone South.", more politely but not more informative "A fatal error occurred during installation."

But the log file is interesting:

Failed ACL:
SetSecurityFileDescriptor is failed at the error code 5; Converted SDDL: '(A;OICI;FA;;;S-1-5-21-600294000-123456789-9876543210-1234)'
Error Code: 0x80077342 (29506)
Windows Error Text: Source File Name: sqlca\sqlsddlca.cpp
Compiler Timestamp: Wed Jun 14 16:27:11 2006
Function Name: ExceptionInSDDL
Source Line Number: 65

Yippie! It's almost English! And the patch is setting ACL's! Hope begins where trust ends. I can only try to imagine how that's rolled back when an error occurs... And an error occurred (5 - Access denied):

Product: Microsoft SQL Server 2005 -- Error 29506. SQL Server Setup failed to modify security permissions on file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ for user rumpelstiltskin. To proceed, verify that the account and domain running SQL Server Setup exist, that the account running SQL Server Setup has administrator privileges, and that exists on the destination drive.

The accounts exists (well, not that name). The domain exists. Not less than the universe. Rumpelstiltskin's alter ego has administrative privileges and what ever that is, that exists on the destination drive, I might not know. But in fact, the ACL is already fine. So to say, exactly how it should look like if that ACL setting would have succeeded.

Try to guess what goes wrong here. Tip: It's your fault. I promise.

Google or Live Search for "SQL Server Setup failed to modify security permissions on file", this will return Knowledge Base Article 916766, which (spoiler warning) tells you that you should check the files inside that directory for their permissions.

Remember that database you just copied in there? Oracle wouldn't have let you do that, would it?

Grant rumpelstiltskin full access to each and every database and log files in that directory and the service pack will not fail with an error.

Not until the next time ...

6月8日

A quick update on Windows Vista and the Technotrend TT-budget C-1500 DVB-C PCI TV-Tuner

Although there is a driver (BETA update from May, 15th 2007) available, the story is still unfinished.
 
It will install. But there's nothing you can do with it. This BDA-driver is BETA and doesn't play with Windows Media Center.
 
You better download the TT-Media Center (also BETA), which includes the driver, BTW.
 
This will install, too. (So much better than last time.)
 
It will scan channels and you'll be able to watch TV.
 
Once.
 
Next time it will hang and burn your CPU (exactly one CPU, if you have more).
 
Workaround: Delete the Technotrend hive in HKCU\Software. Please check it's HKEY_CURRENT_USER, you are working in. Maybe, you have to remove "Intervideo for Technotrend" as well.
 
And, no, ProSieben.HD or SAT1.HD won't show. Support for HDTV is limited to MPEG-2, although the board does software decoding anyway.
 
So, what do we have and what can we hope for?
 
We have a driver that doesn't work with Media Center, a run-once only TV application and support for H.264 only with the premium S2 board.
Can I really hope they get out of BETA, fix MCE and provide H.264 for cable, if only for Intel QX6700 or better?
 
Probably time to switch to Satelco. Although they are solving the Windows MCE problem with Buhl Sceneo Vista TV. This is a TV app within the Media Center TV app. Not exactly peace-of-mind.
 
On a sidenote: Praise Siemens! Despite their management "issues" they found time to update their ISDN software for seven year old Gigaset 4175i to support Windows Vista and it works like a charm!
 
In your face HP! My next all-in-one printer/scanner is so not going to be from you.
 
Finally, ATI/ASUS found also headcount to assemble a 120 megabytes graphics driver download for Windows Vista that doesn't completely suck (of course, it's BETA). Anyway, it too can't push my Radeon 1300 above it's 4.1 gaming performance rating.
 
So I'm sticking with XP for the time being. But I'm on my way out.
6月7日

A quick update on removing Asus aaCenter

A while ago I was troubled by a tool that was installed with the software for my Asus P5B-E motherboard: aaCenter did show up in the task switch window because it had just it's desastrous "ASUS ACPI Cneter"[sic] main window hidden.
 
I recently updated the Asus software, including PC Probe II, now version V1.04.19, and, tada, aaCenter is no longer run by default.
 
But, (there's always a "but"), it is started when PC Probe II is launched. And it doesn't exit with PC Probe II. And PC Probe II is going awry when it's not running.
 
A quick look with Process Explorer and Process Monitor as well as playing with the SpeedFan tool, it goes to show this little software engineering gem seems to read ACPI information about temperatures, fan speeds and voltages, put that in the registry (HKCU\Software\ASUS\AASP) and update the mainboard management chip data (at least the power supply fan speed).
 
So removing it may harm you, if you're monitoring your motherboard hardware or depend otherwise on ACPI information for temperature management.
6月6日

Renaming files using Powershell

Recently, I unpacked somebody's installer.

I know, it might be borderline with the license, but I just wanted to take a peek.

It's a redistributable package which is distributed with a development environment so it can be incorporated into an installer bootstrapper. And it has been updated several times for individual download as an update or full install, yet without packaging information for said bootstrapper package.

If that doesn't call for some peeking and tweaking, I don't know what does.

When I unpacked and "darked" the installer, I was left with a bunch of files named with arbitrary numbers in arbitrary directories and an XML document that had the information about those names in various elements across it's hierarchy.

CMD.EXE's "FOR /F" is a blessing, but in it's heyday, nobody thought of renaming files based on information in XML documents.

Short of creating an XSLT, I gave Powershell a try.

But it doesn't do it in a one-liner, due to the pain in the neck that is XPath's handling of default XML Namespaces:

[xml]$wxs = get-content D:\Temp\ReportViewer\ReportViewer.wxs

$nsmgr = new-object System.Xml.XmlNamespaceManager($wxs.get_NameTable())

$nsmgr.AddNamespace("w","http://schemas.microsoft.com/wix/2003/01/wi")

$wxs.SelectNodes("//w:File",$nsmgr) | ForEach-Object -process {$f = get-childitem -path $_.Source;$f.MoveTo($f.DirectoryName + '\' + $_.LongName)}

The foreach-object is an ugly workaround. A colleague of mine (who I tortured with every step to get to these lines) brought up the idea of taking the object pipeline concept a little further by using

Add-Member -memberType NoteProperty -passThru

to join the two streams of information.

A lot of stuff to rename four files.

Completion of the latter approach left as homework for the interested reader.

 

Please note: script code fragment samples provided "AS IS", without support or warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non-infringement. In no event shall the author or copyright holder be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

Windows Live Writer causes svchost to run at 100%

I wanted to write something interesting, really.
But the state of today's ubiquitous beta software is just that: beta.
So I write about that.
 
My favorite blog writing tool, Windows Live Writer 1.0.1 (6), has been updated to a new version 1.0 (12.0.1183.516) and now I wanted to use the latest and greatest.
 
Uh, oh. Utter failure. Again.
 
On a fully patched Windows XP machine, it causes svchost to burn every cycle of the CPU. Probably the same 'ol Automatic Update Services terror that haunted us past month. There's wuaueng.dll in the bad thread, that's what I could see before my debugger (Visual Studio) hung up on me loading symbols.
 
Somebody call SoftICE to the rescue.
 
Everybody else, be patient. It appears, the attack lasts half an hour, or so. So make sure your laptop's battery is fully loaded before running the new beta of Windows Live Writer for the first time. And have a spare machine to actually get something done.