A laser-target-coil system is studied to explore the possibility of controlling the conversion of laser energy to a high-strength magnetic field. An analytic self-similar solution to a set of fluid equations is derived in two dimensions for the description of a laser-produced corona expanding rapidly away from the target surface. The self-similar model is then used to study the transport of hot electrons, using a method of particle simulation, A circuit equation is solved to characterize the electrodynamic response of the system to the laterally spreading hot electrons, A millimetre-size megagauss field can be produced in a useful mode if a CO2 laser beam is focused on the target at intensities >1014 W/cm2.