Infusing Chilies in Alcohol
I've infused jalepenos for 1-2 weeks successfully, I don't know if there is an upper limit past that. The alcohol should prevent spoilage and the pH is too low for botulism to be a concern.
Infusing them whole is ok. There will be a lot more heat if you leave in the seeds and membranes. 
Cooking them will change the flavor. Only do this if you want the flavor of a cooked chile.