VFP .exe application fails to create PDFCreatorQueue object, while .prg version runs smoothly


We have a new application created in VFP 9 SP2 with a Method ReportToPDF that uses PDFCreator 3.3.2 to produce a PDF file from a REPORT without user intervention.

The compiled EXE file was running well two days ago. After some improvements to handle the process to produce the next job, suddenly the ReportToPDF method failed at the CREATEOBJECT( 'PDFCreator.JobQueue' ) command.

To debug we copied the code to a .PRG file and the code ran without any problem. Every time we changed and tested the PRG, everything went well. Every time we moved the code back to the compiled application (.EXE) it failed at the CREATEOBJECT(... line with the x800700002 file is not found OLE error, which means that VFP COM interface is not finding the library in the registry.

We have uninstalled and installed PDFCreator twice trying to solve this issue without any success.

The weird thing is hat the .EXE application worked well for several days and suddenly it simply stopped working.

As our application runs on a Terminal Server for several users, I asked my team to install and test the "failing" compiled version on one of our TS and "miraculously" it worked!

However, it does not run on our development environment.

Has anyone gone through something like this? Has anyone found a solution to this strange situation?

Thank you very much for your help.