The Code 31 error tends to relate to a problem in the registry, which prevents the drivers from loading.
A possible course of action would be to uninstall the Wireless Network Adapter in Device Manager, run a registry cleaner (such as that in Ccleaner), reboot, when Windows should "find new hardware", and reinstall the wireless adapter.
Ccleaner from click here
Windows XP drivers for MSI Wind U160 click here
Windows 7 drivers for MSI Wind U160 click here
You could actually try running Ccleaner's Registry Scanner first of all, without uninstalling the adapter, to see if it fixes the problem.
Should I upgrade to Windows 10? 8 reasons why you should upgrade to Windows 10... and 2 why you…