This is
not a virus, it doesn't even work on modern systems and even if it does, repairing is as easy, as restoring a single file from a rescue environment.
Why it's not a virus
By definition a computer virus is a program that can replicate itself and spread from computer to computer. This doesn't do absolutely any replication.
It doesn't even do anything really malicious, in case it actually succeeds in deleting that file without Operating System restoring it, it is possible to do so
using system repair. No real damage is done to the system.
Not to mention, nowadays, malware rather focuses on collecting user data, or building a botnet network and spreading, the days of viruses that actually managed to damaged the system and data are long gone. If you want to do that for educational purposes I suggest you start learning the basics of how technology works, mostly processor on the low level and the operating systems. Once you understand these properly, you can search for exploits to do some real damage.
You might want to read my article:
http://www.hackcommunity.com/Thread-How-...or-dummies
Why it doesn't work on modern systems or in other scenarios
That's really simple. Modern systems simply protect their crucial files and doesn't allow you to delete them, even with standard administrator rights. Therefore, the attempt to delete it will ultimately fail.
Also, it might not work on older systems as well. You provided an absolute path, that is specified that the system is located in folder Windows on the drive C: While this is usually true, in cases the system is located elsewhere, it will also fail to work. To fix that, I recommend using system environment variables, like following:
Code:
%systemroot%\\system32\\hal.dll
This will ensure that you'll access proper location of the system folder no matter where it is stored, because %systemroot% is automatically replaced with the location of the folder with the files of the operating system.