Restoring the smart card service in Windows XP (and 2000)
I've been experimenting with my computer and I managed to accidentally screw up the PC/SC components of my Windows XP laptop. I remember I once had the same problem with Windows 2000, I managed to resolve the problem by running the following command, and restarting the PC.
SCARDSVR.EXE reinstall
It was effective, and I was happy... because a friend of mine told me that if I had Windows XP, then the only way to resolve the problem would be to reinstall Windows.
Note: scroll down to the end of the article to read the good news.
Time passes by, I ended up with the same problem, but this time I had Windows XP. My friend's words were still in my memory... ah... bad news, especially that I'm one of those who would never ever resolve a problem by reinstalling the OS. That's not normal, a modular architecture should allow me to replace a component, take it out, or plug it in, without affecting the whole system. I have no clue how Windows XP's PC/SC components work, but they work in such a way that if removed - they can't be restored (as I once did in Windows 2000).
The problem was rather weird, the Smart Card service was not listed at all. I ran
SCARDSVR.EXE reinstall
The service was now there, but still the PC/SC-enabled software told me that no readers were found in the system. I then found an alternative way to restore the PC/SC components of Windows
SCARDSVR.EXE reinstall
REGSVR32.EXE %SYSTEMROOT%\SYSTEM32\SCARDSSP.DLL
NET start scardsvr
This was not efficient either.
The good news is that another friend of mine told me that a similar problem was once resolved with a tool called XPLite. Its purpose is to allow one to remove various unused components from Windows. I gave it a try, and removed the Smart Card service. I then restarted the computer, and installed the Smart Card service back, using XPLite. After another restart, everything was back to a normal state.
Now there is a new item in my todo-list: find some spare time and use RegMon and FileMon to find out what XPLite is doing, and come up with an independent way to resolve the problem. I don't feel comfortable paying them for this; after all, it's just a matter of copying some files and updating some registry entries.
Why would Microsoft make it so complicated, I don't know... But as long as there's no need to reinstall the OS...
Update: I did find a way to do it manually, I described how to reinstall the smart card service on Windows XP on Lazybit.