Application Error when simultaneous runs of exe

Convert your BATch files into EXEcutable format in one click.
Post Reply
curo
Posts: 3
Joined: Tue Oct 27, 2009 10:16 pm

Application Error when simultaneous runs of exe

Post by curo »

I have a php that is included in the exe and referenced with the %MYFILE% variable.

The problem I am having is that when the exe is executed again while it is already being run, it gives me an application error:

Application Error
Exception EFCreateError in module cowboy.exe at 0000A771.
Cannot create file "C:\Documents and Settings\Peebody\Local Settings\Application Data\cowboy.php". The process cannot access the file because the file is being used by another process.


So what I believe is happening is that the exe is trying to extract the file into the temp folder for running, but because another instance of it is already running, It crashes and gives the above error.

What can you recommend besides "Don't run 2 at the same time." ;)
Is there a way for a batch file to check if a file already exists?
Is there a way to loop the check and execute when the file is no longer existing?
Or is there a better way of dealing with this?

Thanks.
support
Site Admin
Posts: 476
Joined: Fri Feb 13, 2004 1:05 pm

Post by support »

Do you have a latest version of compiler?
curo
Posts: 3
Joined: Tue Oct 27, 2009 10:16 pm

Post by curo »

support wrote:Do you have a latest version of compiler?
I purchased my copy no more than 3 weeks ago. I just got the upgrade to 3.2.1 today.

Will that solve the problem of it trying to extract the same file to the same place?

Thanks.
support
Site Admin
Posts: 476
Joined: Fri Feb 13, 2004 1:05 pm

Post by support »

Yes, current version check APPDATA folder for extracted files and will not overwrite them.
curo
Posts: 3
Joined: Tue Oct 27, 2009 10:16 pm

Post by curo »

support wrote:Yes, current version check APPDATA folder for extracted files and will not overwrite them.
Please let me know what will it now do when it encounters a file that already exists?

Will it wait and run after the first one is finished and deleted?
Will it create it in a different directory and run?
Will it just skip the running of the exe?

Thanks.
support
Site Admin
Posts: 476
Joined: Fri Feb 13, 2004 1:05 pm

Post by support »

If file already exists it will not extract it again, just continues execution.
Post Reply