svētdiena, 2011. gada 27. februāris

Windows - arrghhh!...

Disclaimer

It was not my win xp machine, I use Linux.


Symptoms

Suddenly all USB flash drives stopped to work. While on my laptop (Linux, of course) I could easily mount and freely access them, that win machine failed to recognize them. Windows saw a USB mass storage device, but failed to see the disk device. "Unformatted drive, do you want to format it?" Yeah, sure, I want to format it and lose all my vacation pictures! Besides, it couldn't format, because it could not access the disk device.


What I did

It had happened also few days ago, when I solved it by uninstalling all USB composite devices from device manager and rebooting. This time this trick didn't work. But you could try it connecting your old working PS/2 keyboard before that.

After spending couple of hours in the jungles of all kinds of forums with smart a$$es suggesting completely dumb solutions (like using super-duper disk formatting tools etc.) I found out one of windows services (Universal Plug and Play Device Host Service) was not started. It was set on Manual startup mode and was stopped. When trying to start it system gave me an error message saying something like "didn't work because some of dependency services not started". This service was dependent on some HTTP and SSDP Discovery Service. A-ha. And where the heck is that HTTP service?? There was HTTP SSL (HttpFilter) in the list but no HTTP. Google told me it was some http.sys file related to IIS. OK, and of course I made that n-lite custom image without IIS.. (facepalm)

Have you ever tried to edit manually sysoc.inf (list of items for Add/Remove Windows Components)? I had to because n-lite removed not only those IIS parts but also the entry from that list. Thanks, n-lite.. OK, installed IIS, it asked for a CD (but of course!) some hundred times, but needed service didn't appear. Actually, maybe it was there also before but somehow hidden. Don't know. In regedit (HKLM/CurrentControlSet/.../LEGACY_HTTP) it kinda was, but not in services list and didn't work. Fine.

So.. there is such poorly documented command in winxp as sc. And a command

sc delete http
followed by
sc create http binPath="C:\Windows\System32\http.sys" DisplayName= HTTP start= auto 
somehow deleted a non-existent service and re-added it. Believe or not, I still didn't see that HTTP service in services list, but now both SSDP Discovery Service (also dependent on HTTP) and Universal Plug and Play Device Host Service started normally without errors. Re-inserted USB flash disk and - surprise, surprise! - winbox automagically recognised them like nothing had happened.


Conclusion

I won't tell you anything new. Windows sucks a$$ and must die. It is like trying to knit with both hands covered by a blanket - you kinda see a book with instructions, you feel your hands but you just can't be sure what exactly are you doing! That's why "arrghhh" in the title and that's why I use Linux. Save your nerves, make the switch!

Nav komentāru:

Ierakstīt komentāru