Gov. Timothy M. Kaine issued an executive order requiring that a database of people banned from buying guns include anyone who is found to be dangerous and ordered to undergo involuntary mental health treatment.
Seung-Hui Cho had been ordered to undergo psychiatric counseling after a judge ruled that he was a danger to himself.
But because Cho was treated as an outpatient and never committed to a mental health hospital, the court's decision was not entered into the database that gun dealers must check before selling a weapon.
The database "should include any determination that someone is mentally ill and so dangerous to himself or others as to warrant involuntary treatment," Kaine said in a statement.
Cho, a 23-year-old Virginia Tech senior described as a troubled loner, bought his guns legally through gun shops. He gunned down 32 people in a residence hall and a classroom building before killing himself.
No motive has been established for his rampage.