|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
itself deletion!!!
Hi,
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) End End Sub ' Dont really need the /m ' or /w ''''''''''' but it didn't work on 2K and XP OS. maybr the problrm with start. Any help? Best Regards, |
|
#2
|
|||
|
|||
|
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: test.bat: Code:
myExe.exe del myExe.exe |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > itself deletion!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|