I might have found the solution in another thread (which I'd link to if I knew how, but I don't know how to do it so I'm copy/pasting the solution here). I haven't tried it yet (I'm not on the computer that has the problem) but other folks in the thread said it fixed the problem for them.
---------------------------
SOLUTION (copied from another thread):
When you install your viewer in directory where installed, usually C:\Program Files\SecondLifeViewer2\ there will be file called winmm.dll. In my case that was the file causing trouble and when I have deleted it, viewer started to load and work correctly. Apparently file is responsible for some sound and joystick functions, but there is one in your system32 directory so this one can be deleted.
Hope it will work for rest of you with same problem