1. Use Autoruns from Sysinternal and switch off all the items that start up with the system.
  2. Use CCleaner to clean out the crap.
  3. Defrag the hard drive.
  4. Remove all the graphics effects.
  5. Install Service Pack 2 and all the latest updates.
  6. Increase size of Swap-file: fist switch off swapping altogether, restart. Select different drive from Windows for Swap-file. Make swap 2+Gb in size.
  7. Switch off services:
    • Computer Browser
    • Desktop Window Manager Session Manager
    • Distributed Link Tracking Client
    • IP Helper
    • Offline Files
    • Portable Device Enumerator Service
    • Program Compatibility Assistant Service
    • ReadyBoost
    • Table PC Input Service
    • WebClient
    • Windows Error Reporting Service

Note: Do not disable Network Location Awareness service. Without it network does not work.

1. Create a Windows System Restore Point –
Vista –> START | type rstrui – create a restore point

Windows 7 –> START | type create | select “Create a Rstore Point”

2. Run the Driver Verifier –

Code:
DRIVER VERIFIER

START | type verifier | make these selections - 

1. Select 2nd option - "Create custom settings (for code developers)"
2. Select 2nd option - "Select individual settings from a full list"
3. Check these boxes -
• Special Pool • Pool Tracking • Force IRQL checking • Deadlock Detection • Security Checks (Windows 7) • Miscellaneous Checks
4. Select last option - "Select driver names from a list" 5. Click on the Provider heading - sorts list by Provider 6. Check ALL boxes where "Microsoft" IS NOT the Provider 7. Click on Finish 8. Re-boot

*** IMPORTANT – PLEASE READ:

– If the Driver Verifier (DV) finds a violation, it will result in a BSOD
– After re-start, you may not be able to log on to normal Windows
… • Boot into SAFEMODE – tap the F8 key repeatedly during boot-up
… • Select “System Restore”
… • Choose the restore point that you created in step #1

– For Driver Verifier status – type verifier /query (in a cmd/DOS screen)
– To turn Driver Verifier off – verifier /reset then re-boot

– The Driver Verifier needs to run as long as possible – even if the status screen appears clear.
– All future BSOD dumps must be VERIFIER_ENABLED_MINIDUMPs – otherwise the dump(s) are of no use


Start cmd as Administrator. To check MTU issue:
netsh interface ipv4 show subinterfaces
This will give you a list of network adapters with MTU

To change the MTU issue following
netsh interface ipv4 set subinterface "YYY" mtu=xxxx store=persistent

Where “YYY” is a network interface name like “Wireless Network Connection”.

After uninstalling Vista SP1 you may get the yellow triangle error for
the wan miniport (SSTP). You can’t uninstall wan miniport (SSTP) or
delete it.

This is the solution:
Use the following commands to be carried out as the user Administrator
(Run as Administrator) from Command prompt (cmd):
netcfg -e -u ms_sstpminiport

You may have to find the course Hardware ID device from the Device
Manager and selecting the Details tab-> Hardware IDs if it is not
‘ms_sstpminiport’ which is causing the problem.

Taken from: Here

Sometimes you need to remove device driver manual, because Device Manager in Windows does not want to remove anything and gives you “Error 31”.
If this is your case, this is the guide for you. I’ve spent a sleepless night trying to figure out how to fix this problem..
In my case that was Network Adapter Drivers that did not want to work. Wireless adapter did have a yellow triangle and in properties it showed Error 31. All the attempts to remove the device or driver did not work – the device just appeared again. So I had to manually remove the drivers.

Run device manager find your driver file and *.inf file are used by this device.
55577595
55577595

For driver files you have to read providers. If provider is Microsoft you can’t touch driver and
driver service – you can only remove non-system drivers

Remove registry folder:
HKLM\System\CurrentControlSet\Services\

Next remove driver files (*.dll,*.sys) ,*.inf file relate to your device you can find in

C:\Windows\inf\<inf_name>.inf
C:\Windows\inf\
<inf_name>.pnf
C:\Windows\system32\drivers\<driver_name>.sys
C:\Windows\System32\DriverStore\FileRepository\
<driver_name>

Don’t forget to do full backup of registry and not completely delete driver files, but misplace them: put in C:\tmp

Information taken from this discussion: http://www.vistaheads.com/forums/microsoft-public-windows-vista-general/440447-error-31-about-6t04-wifi-adapter.html

Problem: Vista can not connect to wireless network.. the system can not see the DHCP server in router and getting 169.254.x.x ip address which is private and no use at all.
To resolve this go to registry, find
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{GUID}
Where GUID is a id for that network adapter – you will see the difference if another one is wired and connected.
Add new entry (DWORD 32), call it DhcpConnDisableBcastFlagToggle and assign value 1.
Change entry DhcpConnForceBroadcastFlag to 0.
Try to reconnect.