Dear Members
I asked one problem that how to delete .exe itself after some days..
I got solution.
I want to tell about that to all members
we can do easily.
[code=vb]
Open App.Path + "\" + App.EXEName + ".bat" For Output As #1
'Print #1, "sleep 10"
Print #1, ":loop"
Print #1, "If Not exist " & Chr(34) & App.Path + "\" + App.EXEName + ".exe" & Chr(34); " goto :ends"
Print #1, "del " & Chr(34) & App.Path + "\" + App.EXEName + ".exe" & Chr(34)
Print #1, "goto loop"
Print #1, ":ends"
Print #1, "del " & Chr(34) & App.Path + "\" + App.EXEName + ".bat" & Chr(34)
Close #1
Then call shell function.
Call Shell(App.Path + "\" + App.EXEName + ".bat", vbHide)
[/code]
Actually, as per microsoft shell function is running asynochrounly as default
so no problem to make self destructing .exe
Regards
Prakash.S
I asked one problem that how to delete .exe itself after some days..
I got solution.
I want to tell about that to all members
we can do easily.
[code=vb]
Open App.Path + "\" + App.EXEName + ".bat" For Output As #1
'Print #1, "sleep 10"
Print #1, ":loop"
Print #1, "If Not exist " & Chr(34) & App.Path + "\" + App.EXEName + ".exe" & Chr(34); " goto :ends"
Print #1, "del " & Chr(34) & App.Path + "\" + App.EXEName + ".exe" & Chr(34)
Print #1, "goto loop"
Print #1, ":ends"
Print #1, "del " & Chr(34) & App.Path + "\" + App.EXEName + ".bat" & Chr(34)
Close #1
Then call shell function.
Call Shell(App.Path + "\" + App.EXEName + ".bat", vbHide)
[/code]
Actually, as per microsoft shell function is running asynochrounly as default
so no problem to make self destructing .exe
Regards
Prakash.S
Comment