WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Compiler
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Compiler Runtime Error - EXE File Open Failed


Question:

I have a compiled WIL program that clears the sys, app and sec event logs saving each to a folder on the c: drive. I have installed the WIL compiler 2006C on the 64 bit server and recompiled the code but the .exe will not run. It returns a "Compiler Runtime Error" box with "EXE file open failed" when run interactively in a DOS box.

A second box appears titled "Fatal Error" which contains the message "DLL(s) not found or created".

Answer:

What compile option are you using? I wonder if the code even begins to execute at all. try adding Debugtrace to the beginning of the script re-compile and run. Post the resulting trace file output (if any).

If no trace file is generated post screen shots of the errors displayed.

Sounds like you made a large model exe file and placed it in a read-only folder.

User Reply:

The .exe was compiled with the large model on the same machine that I was trying to run it on. I copied the .exe to c:\windows\system32 and ran it as a local administrator from within a DOS box after connecting to the directory c:\windows\system32.

The code is 51 lines long and has been running on 32 bit hardware running W2K Server SP4 for about a year. It saves and clears the event logs.

Answer:

Hmmm. c:\windows\system32 There has been a small spate of problems related to that folder. *Something* is going around adding some kind of file protection to that folder on a few systems. No idea what it is. Some suspicions all on the automatic Microsoft updates. No idea really. But it has happened to a few customers.

Does not sound exactly like the problem you are having, but it appears some semi-widespread utility might be doing that is firming up a system protection.

Other than that...well, it sounds like the compiled exe cannot get to its DLL for some reason.

User Reply:

The c:\windows folder's read-only attribute is checked as is the c:\windows\system32 folder's. They are checked but not settable so perhaps it is some form of GPO that is being pushed??? All other permissions/ownership etc. look correct.

The next step (tomorrow) will be to run the .exe from a different folder and see what happens....

You got it exactly right. The c:\windows\system32 folder was the problem. I created a c:\bin folder and put the executables there... all has returned to sanity.

P.S. Even though c:\windows\system32 is on the PATH, even the .dll could not be found if located in this folder!!!


Looks like the c:\windows\system32 folder can only contain 64 bit EXEs. When the exe is compiled using the 64-bit compiler the exe executes fine. If you must run the exe from this folder on a 64-bit system, make sure to compile your WinBatch script using the 64-bit compiler.


Article ID:   W17385
File Created: 2011:08:29:09:26:12
Last Updated: 2011:08:29:09:26:12