Running EXE files from within a Perl Script
Posted on 2007-11-27
I have written a piece of bespoke booking software in Perl on the Xampp implementation of Apache and I've encountered a problem running .EXE files.
My software ties in to the popular (in the UK) Sage Accounting package. The company (Sage) supplies a set of develoment tools to read and write data to and from the accounts database but they only supply these tools in VB6 and VB.NET format. I have Visual Studio and so used the VB6 version of the tools to produce an .EXE file which basically pulls out the next valid invoice number from the Sage accounts database. It will do more, I just haven't got that far yet!
My problem is this, when I try to call my .EXE using the SYSTEM command in PERL, the browser tries to call the code but basically never returns, i.e. the bar at the bottom of the browser very very slowly inches forward but nothing further happens.
My .EXE file should create a file when it runs but doesn't so I assume that the .EXE is just not executing. If I call my .EXE file via RUN, it all works fine. I've tried to open Notepad using SYSTEM but exactly the same thing happens.
My software also uses Easy Software's HTML2PDF software to generate PDF files, the same executable can be run directly as a Windows application or in PERL using the SYSTEM command and it has always worked fine so I'm assuming that there's some problem with the EXE file that VB6 is generating - any help would be greatly appreciated.