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 DeclarationsNO APIs
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