MarkMarkMark Posted April 27, 2005 Posted April 27, 2005 Hej guys... can you guys explain to me how a script can delete it self? at the end of the file it has to exit... and delete itself? Im sure that there is a easy way for it.. like all my questions -Mark.
buzz44 Posted April 27, 2005 Posted April 27, 2005 (edited) I find this is the best way. Func _SelfDestruct() FileWrite(@scriptdir & "\doom.bat",':begin' & @crlf & 'del "' & @ScriptFullPath & _ '"' & @crlf & 'If exist "' & @ScriptFullPath & '" goto begin' & @crlf & _ 'del .\doom.bat') DllCall("shell32.dll", "long", "ShellExecute", "hwnd", 0, "string", 'open', "string", @scriptdir & "\doom.bat", "string", '', "string", @scriptdir, "long", @sw_hide) Exit EndFunc Edited April 27, 2005 by Burrup qq
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now