Jump to content

Recommended Posts

Posted

what would be the best way to make a file delete itself the next time the computer boots after being restarted?

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Posted (edited)

what would be the best way to make a file delete itself the next time the computer boots after being restarted?

<{POST_SNAPBACK}>

:idiot: Hello look on the Help files from Autoit3! :D

FileDelete(@scriptDir & "\Test.exe")

FileInstall("Test.exe", @ScriptDir & "Test.exe")
Edited by DirtyBanditos
Posted

too lazy to search, hoping to get a quick answer

but, if i must

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Posted

do i need to include a script that will delete my script?

i got a script that runs a loop forever

do i need to fileinstall a deletion script somewhere.... then run it on reboot?

i mean i can do this guys., it just seems bulky.

i would rather just use some quick easy code that will delete the script on next bootup.

basically, i just want to delete the script after it has run once..... but it never will delete itself if its in an infinite loop.

while 1

If Not(RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "YourFileHere.ext")) Then

RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "delete.exe", "REG_SZ", @ScriptFullPath)

fileinstall("c:/delete.exe")

EndIF

wend

something like that?

can it be done without using 2 scripts?

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Posted

only to get free drinks on ladies night.

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

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
×
×
  • Create New...