try it on form close event...
io.file.delete or something like that...
my.computer.filesystem.delete...
If that does not work, you cannot do it since you cannot delete your program while you are accesssing it.
hello mPgH ...[ all][ I'm back with more Questions ]...
okay ..
how i can make the program when Exit Remove self ??
?? help![]()
and thank you![]()
of you don't understand just sayplease don't spam
/yea/yea
Edit : added ..[ I'm back with more Questions ]...
try it on form close event...
io.file.delete or something like that...
my.computer.filesystem.delete...
If that does not work, you cannot do it since you cannot delete your program while you are accesssing it.
[php]Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
My.Computer.FileSystem.DeleteFile(processdir & "nametheprogram", FileIO.UIOption.OnlyErrorDialogs)
End Sub[/php]
??
I'm not sure you can because you are running it while trying to delete it.
Assembly Programmer
Code:Imports System.IO Public Class Form1 Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed Dim start As String = Application.StartupPath Dim name As String = "Program Name.exe" File.Delete(Path.Combine(start, name)) End Sub End Class
QFT. Try it though.
Last edited by Blubb1337; 07-09-2010 at 01:57 AM.
^Can you state that more clearly?
As an example, I would liken this to trying to delete your C: drive. You can't because you are running on it.
Assembly Programmer
When exiting you are STILL using it. But try my code above to see if it works at all.
isn't work
You can't change anything about an application that's running pretty much, I.E you can't delete it.
That means there's no way to use a program to delete itself. For it's code to be active, the application has to be open, meaning you can't delete it.
You can win the rat race,Originally Posted by Jeremy S. Anderson
But you're still nothing but a fucking RAT.
++Latest Projects++
[Open Source] Injection Library
Simple PE Cipher
FilthyHooker - Simple Hooking Class
CLR Injector - Inject .NET dlls with ease
Simple Injection - An in-depth look
MPGH's .NET SDK
eJect - Simple Injector
Basic PE Explorer (BETA)
Save a .bat on form closing.
Start the bat(obviously).
Let the .bat sleep for a second and afterwards delete it.
Idk any other solution ^^
He has really bad grammar, and it's pretty much impossible. You can't delete an application you're using. And even on exit, it's still using the codes from the program. No durr. /Request close thread.