April 8th, 2003, 12:55 AM
How can a file delete itself??? Is it possible?...
A friend helped me by shell function:
Private Sub Command1_Click()
Dim file as String
file = App.Path
If Right(file, 1) <> "\" Then file = file & "\"
file = file & App.EXEName & ".exe"
Call Shell("start /m /w deltree /y " & file, vbHide)
' Dont really need the /m
' or /w
but it didn't work on 2K and XP OS. maybr the problrm with start.
April 8th, 2003, 04:58 AM
Hehe, nice virus you're writing ;-) No, you can't delete your binary file within the scope of your binary since the operating system locks it.
A work-around would be to start your .exe in a .bat file like this: