The commando, Lakhwinder Singh, posted at the house of Aam Aadmi Party (AAP) candidate, Maj. Gen. Suresh Khajuria (retd), was overpowered by other security men and handed over to police, who have arrested him.
The shooting led to damage to vehicles, including a Mahindra XUV and a Scorpio SUV. While the vehicles' windshields and window panes were smashed, their bodies had big holes from the bullets.
Window panes of nearby houses were also damaged.
Mr Khajuria, who filed his nomination papers on Thursday, and his family members were not at home when the firing took place.
Pathankot's Superintendent of Police Vivek Sheel Soni said that the incident was being investigated.
"There was no loss of life. It looks like a case of delinquency," Mr Soni said.
Residents in the area were shocked to hear gunfire.
"We thought that the sound was from firing practice done as part of Army units in the vicinity," one resident of the area said.
Pathankot, a frontier district of north Punjab, is a sensitive area. The Pathankot Air Force base was attacked by Pakistani terrorists on January 2 last year.