Doubtful. Pinworms are a type of nematode or simply a worm. Usually quite treatable with a medicine called mebendazole. Some of the antifungals also end in azole such as ketoconazole, but are different types of medication and not likely to be effective. Mebendazole is usually taken as one pill, one dose, one time. Pretty neat really.
No they do not work. No the anrifungal pills do not work for worm infection.