Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 50 total
Thread Run command line file
Thu, Sep 24 2015 9:04 AMPermanent Link

Trinione

I have an 'exe' command line file which creates an image.

How can it be run?

To be clear, the program is a 'DOS' based/command line program, say named: makeimage.exe which I run from the prompt with parameters.

Example: 'makeimage.exe img1.jpg'
Thu, Sep 24 2015 9:09 AMPermanent Link

Walter Matte

Tactical Business Corporation

Maybe something like stackoverflow page could help you .... not sure why you would want to do this....

http://stackoverflow.com/questions/916925/how-to-launch-an-exe-from-web-page-asp-net


Or are you trying to do this in a backend EWB Server?    In which case you just need to add to uses ShellAPI, and use ShellExecute.

Walter


Trinione wrote:

I have an 'exe' command line file which creates an image.

How can it be run?

To be clear, the program is a 'DOS' based/command line program, say named: makeimage.exe which I run from the prompt with parameters.

Example: 'makeimage.exe img1.jpg'
Thu, Sep 24 2015 9:26 AMPermanent Link

Trinione

<< Or are you trying to do this in a backend EWB Server?    In which case you just need to add to uses ShellAPI, and use ShellExecute. >>

Thanks for the prompt response,

Currently I am running via IIS and other web servers.

(1) Can the EWB Web Server run CGI/EXE files?
and
(2) Where can I get information on how to use ShellAPI and ShellExecute ?

The program needs to run the file front the command line after the user adds a filename. At the DOS prompt the command is -  C:\> makeimage.exe img1.jpg
Thu, Sep 24 2015 9:32 AMPermanent Link

Trinione

Ok, found a thread with a search on ShellExecute. Going and read up on it. Thx

http://goo.gl/eY3YU4
Thu, Sep 24 2015 9:35 AMPermanent Link

Trinione

That thread is IE specific.

Hopefully Tim or someone else can add to this discussion with a solution.
Thu, Sep 24 2015 10:08 AMPermanent Link

Raul

Team Elevate Team Elevate

On 9/24/2015 9:26 AM, Trinione wrote:
> Currently I am running via IIS and other web servers.
> (1) Can the EWB Web Server run CGI/EXE files?

Yes - you need to write a custom module for the server but inside there
you can do whatever you want.

> (2) Where can I get information on how to use ShellAPI and ShellExecute ?

It's a windoqs API call so regular API docs :

https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153%28v=vs.85%29.aspx

these days you should be using CreateProcess though :

https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx

Or just google it and there are lot of delphi usage samples (for example

http://stackoverflow.com/questions/17336227/how-can-i-wait-until-an-external-process-has-completed)

Raul

Thu, Sep 24 2015 11:33 AMPermanent Link

Trinione

<< Yes - you need to write a custom module for the server but inside there you can do whatever you want. >>

Am I correct in believing that EWB can only work with modules created with XE? I have Delphi 2007 and no intentions of upgrading as D2007 does all I require... plus the cost to upgrade is absurd.

<<> (2) Where can I get information on how to use ShellAPI and ShellExecute ?
It's a windoqs API call so regular API docs>>

I meant using it from EWB.

<< these days you should be using CreateProcess though >>

Shall look into this.

Thanks.
Thu, Sep 24 2015 12:24 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< Am I correct in believing that EWB can only work with modules created with XE? I have Delphi 2007 and no intentions of upgrading as D2007 does all I require... plus the cost to upgrade is absurd. >>

Yeah, it's XE or higher.  There's a lot of Unicode/UTF-8 processing involved, and support for that wasn't present in 2007.

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Sep 24 2015 12:39 PMPermanent Link

Raul

Team Elevate Team Elevate

On 9/24/2015 11:33 AM, Trinione wrote:
> I meant using it from EWB.

You cannot run executable apps from browser with javascript.

It's a huge security vulnerability.

You could achieve it with ActiveX in the browser or other plugin-in type
things (client side Java applet, maybe Flash) but all of those would
require them to be be installed on client machine and allowed to run
(and your user would still get security prompts most likely).


Raul
Thu, Sep 24 2015 12:43 PMPermanent Link

Raul

Team Elevate Team Elevate

On 9/24/2015 11:33 AM, Trinione wrote:
> Am I correct in believing that EWB can only work with modules created with XE? I have Delphi 2007 and no intentions of upgrading as D2007 does all I require... plus the cost to upgrade is absurd.

You can do this with any web server : IIS/Apache etc - general concept
is simply for client to do a server request and server then runs your
executable on the server with appropriate parameters.

You will need some kind of server side scripting capability (PHP, ASP,
etc) but i assume you already have that in place.

And as always you need dop need to think about security aspects -
especially if this  server is internet facing.

Raul
Page 1 of 5Next Page »
Jump to Page:  1 2 3 4 5
Image