Hoping Someone can help me with this I have 2 issues that I will deal with 1 at a time.
Issue #1
The first is that I need to use EXEOutput for PHP to start an external exe file that has a complicated and multiple parameters / switches after the exe file.
for example:
myexefolder\myfile.exe --param-1=1 --param-2= -differentparamformatvar SOMETHING --param3=3a --differentvar 0 -o http://www.google.com@google
If I try to call the file using HE SCRIPT as simply:
myexefolder\myfile.exe
It works no problem, but as soon as I add the parameters, it does not start the external application.
Here is the HESCRIPT I have used:
procedure TestExeStartup;
var
EbookPath, MyProgram: String;
begin
EbookPath := GetGlobalVar("HEPublicationPath", "");
MyProgram := EbookPath + "myexefolder\myfile.exe --param-1=1 --param-2= -differentparamformatvar SOMETHING --param3=3a --differentvar 0 -o http://www.google.com@google";
RunAProgram(MyProgram, "", EbookPath, false, SW_SHOWNORMAL);
end;
The HESCRIPT is named: “TestingExeScript” and is called via a simple link click from a page where the link is:
<a href="hescript://TestingExeScript.TestExeStartup">Click HERE to START</a>
Any ideas how to get this issue working with the params… It will start the exe fine if I remove the params but I need the params?
Issue #2
Taking the above idea of calling an external exe with params to the next level, I am wondering if it is possible to pass parameters to the HESCRIPTING engine via a link so that the exe parameters could be dynamic based on data in the link. for example:
Instead of my link to call the exe looking like this:
<a href="hescript://TestingExeScript.TestExeStartup">Click HERE to START</a>
Is there a method of calling sort of like this maybe:
<a href="hescript://TestingExeScript.TestExeStartup?file=myexefolder\myfile.exe --param-1=1 --param-2= -differentparamformatvar SOMETHING --param3=3a --differentvar 0 -o http://www.google.com@google">Click HERE to START</a>
or with the data URL encoded like this:
<a href="hescript://TestingExeScript.TestExeStartup?file=myexefolder%5Cmyfile.exe%20%20--param-1%3D1%20--param-2%3D%20-differentparamformatvar%20SOMETHING%20--param3%3D3a%20--differentvar%200%20-o%20http%3A%2F%2Fwww.google.com%40google">Click HERE to START</a>
If someone could help me out with this it would be great!