Sign in to follow this  
Followers 0
Jabberwock

Delete file upon exit?

30 posts in this topic

#1 ·  Posted (edited)

Is there a way to delete a file upon exit?

I wrote a custom installer/uninstaller and well if you run the uninstall it will delete the setup's files but not the uninstaller since it is currently running.

Edited by Jabberwock

Share this post


Link to post
Share on other sites



Is there a way to delete a file upon exit?

I wrote a custom installer/uninstaller and well if you run the uninstall it will delete the setup's files but not the uninstaller since it is currently running.

Look at OnAutoItExit()

If you're talking about deleting the actual .exe/.au3 your using on their puter, open SciTe and type in:

SelfDelete[space]


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

dosn't work


Share this post


Link to post
Share on other sites

dosn't work

sucks to be you doesn't it.

(that sucks to see that.. doesn't it!!)

(if you want to see more, then post an example script that you want to see something happen (in detail))


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

lol, bud, umm, you may want to help me but you must have some thing wrong here, some thing you're not telling me, i'm running the latest beta (to my knowledge) and typed it at the VERY end of the func that was executed.."SelfDelete " <----YES a space


Share this post


Link to post
Share on other sites

lol, bud, umm, you may want to help me but you must have some thing wrong here, some thing you're not telling me, i'm running the latest beta (to my knowledge) and typed it at the VERY end of the func that was executed.."SelfDelete " <----YES a space

Try reading "Exactly" what I said.. or are you someone that needs step by step how to screw yourself examples?

1. Open SciTe Editor

2. Type SelfDelete

3. Hit the space bar

4. Poof!


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

For you...Once you're done viewing lemmie know, i don't want to waste bandwidth....

http://www.team-nex.net/whatnow.avi -- Moved, msg me if you want to see it.

Edited by Jabberwock

Share this post


Link to post
Share on other sites

For you...Once you're done viewing lemmie know, i don't want to waste bandwidth....

http://www.team-nex.net/whatnow.avi

For the MORONS
Func _SelfDelete($iDelay = 0)
    Local $sCmdFile
    FileDelete(@TempDir & "\scratch.bat")
    $sCmdFile = 'ping -n ' & $iDelay & '127.0.0.1 > nul' & @CRLF _
            & ':loop' & @CRLF _
            & 'del "' & @ScriptFullPath & '"' & @CRLF _
            & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _
            & 'del ' & @TempDir & '\scratch.bat'
    FileWrite(@TempDir & "\scratch.bat", $sCmdFile)
    Run(@TempDir & "\scratch.bat", @TempDir, @SW_HIDE)
EndFunc
IS WHAT HAPPENS WHEN YOU FOLLOW MY POST.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

fuck you


Share this post


Link to post
Share on other sites

fuck you

No problem punk... you're mad why? Because you can't follow instructions? Right!!

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

i showed you a god damn video of your "instructions" Was my movie not good enough for you?


Share this post


Link to post
Share on other sites

i showed you a god damn video of your "instructions" Was my movie not good enough for you?

DO YOU HONESTLY THINK ANYONE IS GOING TO DOWNLOAD ANYTHING FROM ANYONE THAT ASK QUESTIONS LIKE YOU DO?

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

you seem pissed, rofl, your just mad it dosn't exist and your wrong


Share this post


Link to post
Share on other sites

you seem pissed, rofl, your just mad it dosn't exist and your wrong

if it didn't exist, then you wouldn't see the function that i posted above... care to make yourself look anymore the idot?

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Show me a script of this actually SELF DELETING


Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Show me a script of this actually SELF DELETING

wtf is your problem!

Ok...

Name a script... IAmAMoron.au3... then in that scipt type

MsgBox(64, 'World Info:', 'Yes Jabba da whatever the hell his name is a moron')

Func _SelfDelete($iDelay = 0)
    Local $sCmdFile
    FileDelete(@TempDir & "\scratch.bat")
    $sCmdFile = 'ping -n ' & $iDelay & '127.0.0.1 > nul' & @CRLF _
            & ':loop' & @CRLF _
            & 'del "' & @ScriptFullPath & '"' & @CRLF _
            & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _
            & 'del ' & @TempDir & '\scratch.bat'
    FileWrite(@TempDir & "\scratch.bat", $sCmdFile)
    Run(@TempDir & "\scratch.bat", @TempDir, @SW_HIDE)
EndFunc

Mpw save it to your desktop... .. Now run it... now look at your desktop... is it still there? Right!!

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Yes, infact it is still THERE, do i need to make another video?


Share this post


Link to post
Share on other sites

Yes, infact it is still THERE, do i need to make another video?

Nah.. make yourself dissapear, I'll wait around until that miracle happens.

Don't need to see what video you need to run, I gave you the exact script, now you've crossed form moron to idiot status.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Compile this then run the exe, then check and the exe will be gone.

MsgBox(0,"", "It does work")
_SelfDelete()
Func _SelfDelete($iDelay = 0)
    Local $sCmdFile
    FileDelete(@TempDir & "\scratch.bat")
    $sCmdFile = 'ping -n ' & $iDelay & '127.0.0.1 > nul' & @CRLF _
            & ':loop' & @CRLF _
            & 'del "' & @ScriptFullPath & '"' & @CRLF _
            & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _
            & 'del ' & @TempDir & '\scratch.bat'
    FileWrite(@TempDir & "\scratch.bat", $sCmdFile)
    Run(@TempDir & "\scratch.bat", @TempDir, @SW_HIDE)
EndFunc

And then say sorry to Smoke_N



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

I can't wait for someone to come along and test this shit them selves, and they will see how much of a fucking idiot YOU ARE


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