Internet wont work on laptop

My internet wont work, ive tried using both crome and IE but both browsers say that I am not connected to the internet despite the fact my computer says that I am connected to the internet. I know its not a network problem because my other devices are connecting fine. Also I tried connecting to the wifi at home and at school and it still does not work. My laptop is a HP ProBook 6390b and I am using windows 7. This problem started occurring after about 4 months disuse of my laptop which I think might be a factor as to why its not working. I have run windows updater and run a scan with my antivirus but still nothing helps. Thank you for any assistance in advance.
 
Have you kept up and installed all the Windows 7 updates and are there any yellow (!) in the device manager?
 
Great - - now it is your turn to be a contributor(y) - - share with us what you did that resolved the problem - - Please!!
 
I got help on a different website, I did the following to fix my problem.

Open a command prompt as administrator

Type each one of the following commands:

ipconfig /release
ipconfig /renew
ipconfig /flushdns
netsh winsock reset catalog
netsh int ip reset reset.log

Now restart your computer.
 
Back