Author Topic: Filter Command File  (Read 7769 times)

pcolvin

  • Member
  • *
  • Posts: 6
    • View Profile
Filter Command File
« on: 14 Jan 2018, 20:41:55 »
I am trying to get PDW to launch a PHP script from the Command File in the Filter.  I am running a WAMP on the machine and all I want to pass is the message text using %7. 

What I have in for the command file c:\path\to\command\php.exe inhouse.php and in the Arguments %7.

I have a batch file that runs the PHP file file and I can pass the simulated message text in the batch file and everything works fine.  I just can't seem to get PDW to launch the PHP file.  I command prompt windows does appear briefly, and disappears, but the PHP script is not being launched.  If it was, the script would write to a log file to confirm that it ran.

Has anyone had any luck launching executables and passing arguments?

Thanks in advance.

VidarParry

  • Top Member
  • ***
  • Posts: 126
    • View Profile
Re: Filter Command File
« Reply #1 on: 15 Jan 2018, 04:45:15 »
Sorry - never needed to try this.
Have you tried it with another executable? Maybe the executable you are running doesn't work in command mode? Is there a way of logging exactly what happens in the Command Window?
Cheers
...Steve

pcolvin

  • Member
  • *
  • Posts: 6
    • View Profile
Re: Filter Command File
« Reply #2 on: 15 Jan 2018, 13:53:08 »
After trying multiple different combinations and a hint I picked up from another post, I was able to get it working.  Below is how it is setup in PDW.

Code: [Select]
Enable Command file field = C:\UniServerZ\core\php71\php.exe

Arguments = C:\UniServerZ\www\inhouse-db.php "%7"

The trick was to put the path and PHP script file in the arguments as well as putting the %7 in quotes.

All is working great now.

VidarParry

  • Top Member
  • ***
  • Posts: 126
    • View Profile
Re: Filter Command File
« Reply #3 on: 18 Jan 2018, 03:11:03 »
Well done - -thanks for sharing:-)
Cheers
...Steve