So if I have a disclaimer saying if something goes wrong as a result of downloading one of the free programs I wrote on my site that wouldn't be legal? Thanks
Well, the law depends on where you and your customers are located, for one. I've never heard that a disclaimer is "not legal" - just look at all the major websites that have disclaimers in the terms of service, for example. What your friend may have meant is that a disclaimer does not necessarily shield you from liability. You can't necessarily just say "it's not my fault if it doesn't work" and be free from responsibility, depending on the law your site falls under. If you want a disclaimer that will actually hold up in court, I suggest you pay an attorney to write you one.
This would be fine if you have a place where they can agree to the disclaimer. If they download a free program that contains something that destroys their hard drive and they did not agree to hold you harmless then they can sue you but it is unlikely they will. If you are worried just have them check that they agree to the disclaimer before they download.