Electric wire is good but also you need a good fence charger so the bear will know when it touches the wire. The more joules the stronger the shock. A bear has thick fur so bait the wire with something like peanut butter so it will touch the wire with it's nose or tongue so it will feel the shock and not come back. I would put some peanut butter in a few places on the wire. There are place where I have some wood with long staples sticking through for a fox I have been seeing lately around my coops as well as electric wire but for a bear you would need some spikes. Good luck.
https://www.tractorsupply.com/tsc/p...orks-60-mile-ac-powered-low-impedance-charger
http://bearsmartdurango.org/unwelcome-mats/
Here is a picture I came across. If you make a bear mat make sure to use good sturdy nails or screws. I would make it bigger than the one in the picture.
View attachment 2224882
I also came across this advice.
"Unwelcome mats are basically boards full of nails pointing up, that are placed in front of doors and windows to discourage bears from entering buildings. They are simple and inexpensive to make.
The sheet of plywood must be large enough so that a bear cannot lean from one edge and reach the door or window, and should ideally extend past the sides of the door or window by 60 cm (2 ft).
A 4x4 sheet of plywood would provide
minimal protection for a single doorway, while a 4x8 sheet will be needed for most sliding patio doors. Use the thickest plywood possible and galvanized roofing nails with the large flat head. The nails should be long enough to stick out of the wood 2 - 2.5 cm (¾ - 1 in).
If the nails are too long and not strong enough, the bears will discover that they can simply bend them over and step on them. The nails should be nailed into the board about 5 cm (2 in) apart so that there is no way a bear can get his paw on the board.
The sheet of plywood also has to be secured so that the bear cannot simply push it out of its way. If it is placed on a wooden surface, a couple of nails pounded through the plywood should secure it. If the mat is placed on dirt, pieces of rebar can be pounded through the corners into the ground to secure it.
Caution tape should be placed around the area of the mat so that people do not accidentally step on the nails."
Good advice. You really need to zap them. Bears will still rip apart a coop if it’s screwed. They are incredibly strong BUT they respect a good electric fence.
You can also put boards across the windows with the nails sticking out. Electric wire is probably the best option.