System restore can easily erase a virus, since it 'undoes' all changes to your system (i.e. registry, startup items, installed programs) which occurred after that date. However,it does depend on what type of malware you're dealing with - it is equally possible that malware in documents or present elsewhere in your network could persist a system restore.