ketoconazole has anti androgenic properties. It's why they stopped using it in the oral form for fungal infection. Therefore, it MIGHT kills some androgens attached at the hair follicle. This hasn't been studied though as far as I know.
So basically if I'm reading it correctly (and not missing something) it binds to the androgen receptor, therefore it might bind to the androgen receptors in the hair follicle. The problem is that you'd probably have to lather and massage it into the scalp and then let it sit on your scalp for a decent time. I like to leave it on for 10 minutes. It has a half life of 2 hours, so it's not offering you much protection.