Sign in to follow this  
Followers 0
Pottery

FileDelete problem

11 posts in this topic

Hey, I need help with 1 thing. I'm trying to make a time period check and it looks like this:

If _NowDate()="2/12/2010" Then
MsgBox(64, "fateHook - Error", "Your trial time has run out, ask Exhalt for a new one!")
FileDelete(@WorkingDir & "\loader.exe")
Exit
Else
MsgBox(64, "fateHook - Valid", "Press OK to continue with the loading process!")
EndIf

The problem is, when the time runs out the message will come up, but the file won't delete. If anyone has any ideas or thoughts about the issue I would be very happy to hear them, thank you in advance for any attemps at helping me :D -Exhalt

Share this post


Link to post
Share on other sites



Only thing I can think of is that loader.exe isn't in the Working Directory, but somewhere else


For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Share this post


Link to post
Share on other sites

http://www.autoitscript.com/forum/index.php?showtopic=19370&st=40&p=199605&#entry199605

Share this post


Link to post
Share on other sites

Is that file running when the code is trying to delete it? If so, it can't be deleted while it is.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Hmm, no it's in there. I did MsgBox(0, "Test", @WorkingDir) to see if it was the right command and folder, it was. Thanks for the quick response though :D

Share this post


Link to post
Share on other sites

Oooooh, thanks snow; that's it. Noob mistake on my behalf, I guess I'll have to make a seperate file; thanks alot for the extremely fast responses!

Share this post


Link to post
Share on other sites

Oooooh, thanks snow; that's it. Noob mistake on my behalf, I guess I'll have to make a seperate file; thanks alot for the extremely fast responses!

Extremely fast, I'd say you got lucky this time :D

There's another script in the Wrappers that makes a script delete itself, you can use that.


For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Share this post


Link to post
Share on other sites

Extremely fast, I'd say you got lucky this time :D

There's another script in the Wrappers that makes a script delete itself, you can use that.

Ok, thanks; I'll look into that :huggles:

Share this post


Link to post
Share on other sites

Could you tell me what the wrapper command is? Also, with the FileDelete function is it possible to permanently delete it; I tried FileDelete but the file ends up in recycling bin.

Share this post


Link to post
Share on other sites

Could you tell me what the wrapper command is? Also, with the FileDelete function is it possible to permanently delete it; I tried FileDelete but the file ends up in recycling bin.

There isn't a wrappers command. They're snippets of code to put in your script:

http://www.autoitscript.com/forum/index.php?showtopic=19370


For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

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