c#.net advance virus

jbp_vicky's Avatar, Join Date: Aug 2009
Go4Expert Member
does anyone know how to delete any specific type of files from the drive like .txt or something else weather it is system file or normal one.I have tried but can't able to delete to system files....so anyway to do this?
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
What code you used for deleting because it should hardly be one statement.
jbp_vicky like this
jbp_vicky's Avatar, Join Date: Aug 2009
Go4Expert Member
the code i am trying is :
Code:
File.delete(filename);
but the problem is it crashed when it encounters system files.and i wanna delete that one also.....
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
You are trying to run an OS command where you do not have the permission to do so and if you can run your process as admin you will be able to do it.

A programming language cannot get your a command to delete a file even if you do not have the needed permission and so the important thing is not to find that as well. Get to a place where you can have the needed permission.
jbp_vicky like this
jbp_vicky's Avatar, Join Date: Aug 2009
Go4Expert Member
pls help me how can i get the permission?? becoz windows being running will not give me permission any how to delete its own files which is also running.Can u help me by giving solution in coding?
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Admin has all the priviledges.