to get the 4 gig working you will need to upgrade to 64 bit OS, you are currently on 32 bit, which allows 3-3.5GB at most, 64 bit allows (pretty much, there are limits, but sillyly high) unlimited RAM.
Providing you still have the code for your OS then you can upgrade to 64 bit with it.
I think the tool posted works or you can download the operating system you are using, and ONLY the one you are using, from a torrent, install THE ONE YOU ARE USING now and then use the code. You must use the version you have, so if you are on vista premium, you must use vista premium, otherwse it is illegal. Make sure the one you download and install is 64 bit (x64 for XP, x86 for vista, it is also known as) otherwise you will get the same problem.
The post saying you must buy the windows 64 bit version isn't strictly true. This is because when you buy windows, or any piece of software from OS, to games, to anti virus, you aren't paying for the code, you are paying for the key, the liscence to use it. Because the codes work on 64 AND 32 bit versions of windows once you have bought a copy you can use either 64 or 32 bit versions of the same operating system.
You can call microsoft if you arent sure and tell them your ram problem and they will tell you the same thing, i had the same problem upgrading my step-dads laptop to 4GB of RAM, and got told what i just posted above.