What *SPECIFICALLY* is the problem you're having?
Have you launched hammer before and have it work? If not, find the hammer.bat file and launch that, THEN launch the hammer.exe that you find you the bin folder of Team Fortress 2's steamapps folder.
If you've done that, could you explains the conditions?