MarkMarkMark 0 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. Share this post Link to post Share on other sites
buzz44 1 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 Share this post Link to post Share on other sites
MarkMarkMark 0 Posted April 27, 2005 tnx, it worked Share this post Link to post Share on other sites