Hartikainen's first goal -- his first of the season and fourth of his career -- came only 15 seconds into the game.
The Finnish center doubled the Oilers' advantage with another tally 6 minutes later when he deflected a floating wrist shot from Ray Whitney into the net.
Dubnyk, meanwhile, turned aside all 15 shots he saw in the third period as Edmonton improved to 4-2-1 in its last eight games.
Teemu Selanne scored his 26th goal of the season for Anaheim as the 42-year-old likely future Hall-of-Famer played in what could be his final home game for the Ducks.
Jonas Hiller made 13 saves for Anaheim.