Ivermectin will not hurt your piggies even if they don't have mites, but if one has them, it is very likely both do and they both need to be treated. You can get ivermectin in a liquid injectable format (you don't inject it, you put it on their skin - behind the ears) as well as a paste format that you would have to dilute. I found it easiest to use the 1% injectable liquid ivermectin. I found it at a local feed store. The bottle cost me about $40, but it has enough to dose my piggies a hundred times over.
Guinea Lynx :: Ivermectin is a link about ivermectin and the different ways you can use it.
Guinea Lynx :: Topic - I cannot believe I missed this is a great link with pictures and very specific instructions if you want to use the 1% injectable like I did.
Here is a dose calculator
Guinea Lynx :: Dose Calculator if you want to use it rather than doing your own calculations. Just put in the specific type of ivermectin you are using and you will need your piggie's weight. Get a kitchen scale to get an accurate weight for each piggie. You will also need a syringe with a needle to get the ivermectin out of the bottle. You need a 1 mL syringe so you can measure tiny doses (it doesn't take much for your piggie - for example a 1 kg piggie only gets a dose of 0.05 mL (or cc) of ivermectin). I bought needles that are used for diabetic medication that have a removeable needle so I could pull the dose out of the bottle and then remove the needle to apply it. The needles only cost me 33 cents at a local pharmacy.
You will need to give them 3 or 4 doses, about a week apart to get rid of the mites completely. Also, clean their cage out completely when you dose them.
Good luck! If you have any further questions, just ask and we'll try to help!