How to replace system files manually in Win XP
Juha Saarinen (PC World) 08/12/2003 07:52:15

I was recently asked to review a TV capture card with onboard tuner, a task that seemed easy enough. However, despite installing the card correctly and ensuring that there were no hardware conflicts, nothing could be seen or heard. Not only did the card not work, but Windows Movie Maker hung, as well.

It was one of those frustrating problems that took a long time and lots of effort to solve, because Windows doesn’t give you any hints as to what’s going wrong: is it the driver for the TV tuner, the video card, or some other part of the operating system that has indigestion?

Eventually, I traced it down to Microsoft’s DirectX 9.0b update by trying out the card in different Windows XP Professional installations with and without the patch. I discovered that OS installations updated up to DirectX 9.0a worked fine with the card, but beyond that, no go. As DirectX 9.0b contains performance and security enhancements, it seems like a good thing to have, so I decided to pinpoint the cause of the problem. I told Windows XP Professional to run the built-in debugger, Dr Watson (drwtsn32.exe) (see FIGURE 1), automatically, by firing up regedit and changing the following Registry entry to 1 (one) (see FIGURE 2):

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AeDebug\Auto

The next time the TV tuner application crashed, I could wade through the information in the log file created by Dr Watson. Each time around, the good Doc fingered the kstvtune.ax file in the %windir%\System32 directory. This little file was updated to version 5.3.1.902 through DirectX 9.0b, and is described as a ‘WDM [Windows Driver Model] Streaming TVTuner’; it is a DirectShow Filter responsible for tuning into the different channels the card can receive. No wonder no channels showed up! Microsoft’s DirectX team has confirmed that the updated file is causing problems with PAL TV tuner cards. I thought about backing out of the 9.0b update and reverting to 9.0a, and wait for Microsoft to come out with a less broken patch, but… I had turned off System Restore for benchmark testing, and as we all know, once installed, DirectX 9 isn’t easily removed from Windows XP.

As it was just a single file causing the problem and I really didn’t want to reinstall Windows, it was Quick-And-Dirty Hack Time. Well, it wasn’t exactly a quick hack, but it fixed the TV tuner and Movie Maker issues.

The tools required were:

  • DirectX 9.0a runtime (no longer on Microsoft’s Web site, available on the September cover CD)
  • WinRAR (www.rarsoft.com or on this month’s cover CD)
  • CabPack 1.4 (http://home.t-online.de/home/lars.hederer or your favourite Win32 Freeware file site)

First, I extracted the kstvtune.ax file (version 5.3.0.900) from the DirectX 9.0a runtime, with the help of WinRAR, and saved it on the hard disk. Next, I searched for all newer instances of kstvtune.ax on the system. Thanks to Windows File Protection, which protects the operating system against accidental deletions and overwrites of critical files, kstvtune.ax appeared in a number of places:

C:\WINDOWS\system32
C:\WINDOWS\Driver Cache\i386
C:\WINDOWS\LastGood\system32
C:\WINDOWS\RegisteredPackages\{Long CLSID}
C:\WINDOWS\System32\dllcache

I copied the older file into those locations, but Windows File Protection restored the newer file into C:\WINDOWS\system32 each time I fired up the TV tuner application. I tried copying the files over in Safe Mode (restart your computer and press to access it) and removed all instances of the newer kstvtune.ax file, but Windows File Protection still managed to restore the newer version. And, in Windows XP, disabling Windows File Protection requires you to hack a DLL.

It turned out that there was one copy left of kstvtune.ax that I had missed, inside the 70MB driver.cab archive in the C:\WINDOWS\Driver Cache\i386 directory. To fix that, I unpacked driver.cab with WinRAR in a directory of its own, after first having saved a copy in case anything went wrong. (Warning: this takes a long time, as there are over 4500 files in the archive, eating up some 322MB of disk space uncompressed.) Then I copied over the older version of kstvtune.ax, and used Cabpack 1.4 to rebuild the driver.cab file, and copied it over to the C:\WINDOWS\Driver Cache\i386 directory. This time, Windows File Protection didn’t mind the older version, and I had a working TV tuner card and Movie Maker was stable. Phew.

If you know what you’re doing, this process is one way to get around Windows File Protection to sort out small problems without reinstalling the operating system.

Warning

Please note: you need Administrator privileges for the below, and remember, tampering with operating system files and settings is inherently dangerous. Do not attempt it without backing up first.

More about Microsoft, T-Online
Recommend this article?
Yes3 votes
No0 votes

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Enter the fully qualified URL, eg. http://www.example.com/
Users posting comments agree to the PC World comments policy.
Login or register to link comments to your user profile, or you may also post a comment without being logged in.
Syndicate content
 
Gift Guide
MWave
Samsung

CXO Latest

LED Advisor
 

Colour your world with Samsung

A chance to win with every
Samsung Consumable purchase*