This does not work for me. The network corresponding to the ad-hoc network on my Mac shows up as "Unidentified network" in Windows 7. It works fine (nothing shows up in the Network and sharing center) when my Mac is connected normally to my router through Wi-Fi, so I know that the problem has to do with using an ad-hoc network. If anyone knows a solution to this and could post it soon, it would be greatly appreciated.
I'm using Lion.