VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Delete Yourself

by bmbsa (4 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (10 Votes)

let the program delete itself ;)

API Declarations
NO APIs

Rate Delete Yourself

Open App.Path & IIf(Right(App.Path, 1) <> "\", "\Del.bat", "Del.bat") For Output As #1
Print #1, "@Echo off"
Print #1, ":S"
Print #1, "Del " & App.EXEName & ".exe"
Print #1, "If Exist " & App.EXEName & ".exe" & " goto S"
Print #1, "Del Del.bat"
Close #1
Shell "Del.bat", vbHide
Unload Me

Download this snippet    Add to My Saved Code

Delete Yourself Comments

No comments have been posted about Delete Yourself. Why not be the first to post a comment about Delete Yourself.

Post your comment

Subject:
Message:
0/1000 characters