Sign in to follow this  
Followers 0
CyberFunk Productions

delete self

6 posts in this topic

i need code that makes a batch script that will delete my program after it closes, i think there was an example a really long time ago but i can't find it in the search.

Share this post


Link to post
Share on other sites



hmmm...i guess i didin't look hard enough, thanx.

Share this post


Link to post
Share on other sites

hmmm...i guess i didin't look hard enough, thanx.

<{POST_SNAPBACK}>

So how do you delete yourself again? I don't want to comit suicide but it would be nice to know.

Share this post


Link to post
Share on other sites

I have no relation with the following: to delete yourself, click the following:

www.hacksandvirusesthatwilldeleteyourself.com

I've heard that it is pretty good too.

But then again, I'm drunk ^^

Share this post


Link to post
Share on other sites

Some examples in the search, have a problem as 'loop:' should be ':loop'. This causes failure of operation.

I also find it works without the ping? (optional?)

Without ping:

FileDelete("scratch.bat")
$batchFile = ':loop' & @CRLF & 'del "' & @SCRIPTFULLPATH & '"'  & @CRLF & 'if exist "' & @SCRIPTFULLPATH &_
 '" goto loop' & @CRLF & 'del scratch.bat' & @CRLF

FileWrite("scratch.bat",$batchFile)
Run("scratch.bat",@SCRIPTDIR,@SW_HIDE)

With ping:

FileDelete("scratch.bat")
$batchFile = ':loop' & @CRLF & 'del "' & @SCRIPTFULLPATH & '"'  & @CRLF &_
     'ping -n 1 -w 250 zxywqxz_q' & @CRLF & 'if exist "' & @SCRIPTFULLPATH &_
    '" goto loop' & @CRLF & 'del scratch.bat' & @CRLF

FileWrite("scratch.bat",$batchFile)
Run("scratch.bat",@SCRIPTDIR,@SW_HIDE)

Nice and handy little script. :ph34r:

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0