and locate registry.vdf
Open registry.vdf with a text editor (e.g. Notepad) and find:
Registry / HKCU / Software / Valve / Steam /
Under Steam, find the line:
Change it to:
Save the file and try installing the game again.
A note for Mac users
In case the Library folder is hidden, you can go to the "GO" menu, select 'Go To Folder' and enter: ~/Library
You should now be able to see the Steam folder, and the registry.vdf file inside that.