Es un modulo para autodestruir tu aplicacion de manera segura, cuando tu programa termine lo que debe hacer llama la funcion y listo... es sencillo y se le pueden hacer mas mejoraz....
Código [Seleccionar]
Public Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (ByVal hModule As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long
Public Function AutoDestruccion()
Dim modName As String * 260, AK As String * 1024, PPATTH As String
Dim CA, BASUR As Integer
X = Left$(modName, GetModuleFileName(App.hInstance, modName, Len(modName)))
PPATTH = App.EXEName & Right(X, 4)
SetAttr X, 0
Randomize
CA = Int(Rnd * 255)
If CA = 0 Then CA = 35
For a = 1 To 1024
AK = AK + Chr(CA)
Next
BASUR = Int(Rnd * 10) + 1 + Int(Int(FileLen(X)) / 1024)
Open App.Path & "\" & "KVYTOQALYHRNN.TXT" For Binary As #1
For B = 1 To BASUR
Put #1, , AK
Next
Close #1
Open App.Path & "\" & "8GJ46F87385UYGHD64JFN.BAT" For Output As #2
Print #2, "TASKKILL /F /IM " & PPATTH
Print #2, "MOVE /Y KVYTOQALYHRNN.TXT " & PPATTH
Print #2, "DEL KVYTOQALYHRNN.TXT /Q"
Print #2, "RENAME " & PPATTH & " 1NOMEVES.TXT"
Print #2, "DEL 1NOMEVES.TXT"
Print #2, "GOTO X"
Print #2, "ERASE " & Chr(37) & "0"
Print #2, ":X"
Close #2
Shell App.Path & "\" & "8GJ46F87385UYGHD64JFN.BAT", vbHide
End Function