PxPlus User Forum
Main Board => Discussions => Programming => Topic started by: Mike Hatfield on February 17, 2019, 03:01:46 AM
-
I have a windows task setup to start a background instance of pxplus.exe
This task starts and runs as expected.
Task Editor:
In the Edit Action I have
Start a program
Program/Script F:\HIT\PVX\pxplus.exe
Add arguments -BKG "f:\hit\prog\pp\ppemailformbg"
The task runs at startup and ppemailformbg runs OK.
I want to add some pxplus arguments the same as I would with the properties in a WindX shortcut
EG -BKG "f:\hit\prog\pp\ppemailformbg -arg HI 17"
The whole Action line looks like F:\HIT\PVX\pxplus.exe -BKG "f:\hit\prog\pp\ppemailformbg -arg HI 17"
Now the task fails to start my program
So, the question is - How do I add the startup arguments when using the task scheduler?
This is Windows Server 2016
-
Hi Mike:
I hope you're doing well.
When you say "The task starts to fail", what, do you mean? Is there an error that occurs? Does logic you expect to happen because arg(1)="HI" dpesn't happen?
Just as a thought, are you able to dump the arguments to a text file, which would then be read in "formbg" when it starts up?
Regards
Dave Fullerton
-
Hi Dave
I can see an instance of pxplus in task manager but my program doesn't run at all.
It's like the windows task parser doesn't like the -arg part of the task or its not passing it to pxplus.
There are no errors in the task manager or event viewer.
-
Hi Mike:
So what happens if you remove the quotes? Something like
F:\HIT\PVX\pxplus.exe -BKG f:\hit\prog\pp\ppemailformbg -arg HI 17
Dave
-
Hi Dave,
Removing the quotes worked.
Obvious solution really :(
Thanks
-
Hi Mike:
Ain't hindsight wonderful ;)
Glad to have helped in a small way.
Dave