From high mass stars to planets