no one sketch,
So please describe your system a little bit more detailed than with the error message:
the error: avrdude: ser_open(): can't open device "\\.\COM12": access denied
The "access denied" message directs to a problem with the Windows user account control (uac) restrictions.
So what might be the problem, that your access to COM12 is denied by the system?
Software installed as an "Administrator" and trying to use as a "Standard User"?
Is it a "normal" installation of something like "Windows 7 Home Premium Edition"?
Or is it some kind of "virtualized" operating system that prevents you from using all ressources of the system due to configuration settings of the hosting system?