After power outage the friend's computer lost the network connectivity. The machine could list available wifi networks, but after entering the (correct) password there was no network access at all. I connected the cable and no network on the cable too.
Strange.
There is some kind of built-in self-diagnostics in Windows but it was unable to work because of Diagnostic Policy Service startup problem.
Manual start of Diagnostic Policy Service from the Services control panel was not successfull, so my over-the-phone support failed, teamviewer was out of discussion because of non-working network so after few days the machine landed on my desk.
I checked everything, booted live cd with fresh drweb antivirus, but everyting was ok.
No virus except Windows itself was found.
So far so good.
I booted Windows in safe mode with networking support, but it's impossible to run Diagnostic Policy Service in Safe mode.
Strange.
I booter Windows in normal mode, tested the wifi, run the diagnostic, tried to start Diagnostic Policy Service manually and got
Windows could not start the Diagnostic Policy Service service on Local Computer
Error 5: Access is denied
At leass I can google something.
After lot of incorrect stuff I found the working solution:
1)
run cmd.exe as administrator
2)
net localgroup Administrators /add networkservice
net localgroup Administrators /add localservice
3)
exit cmd
4)
restart
I found this on http://answers.microsoft.com/en-us/windows/forum/windows_7-networking/cannot-start-diagnostics-policy-service/66901218-e54b-4dc8-93e9-3f1d2dabd49f.
The page is Microsoft made so it's quite idiotic and you can not link to particular answer as it's quite common nowadays so look for the danielgr's answer from October 17, 2014.