11-26-2021, 07:39 PM
(11-20-2021, 03:38 PM)Amélie Wrote: Hello,
I am starting to migrate my VCL application to Intraweb. I'm not used to working with it. In my VCL code, I am running an external application with "ShellExecute". In Intraweb, I don't know how to do this.
The .exe is located in the "wwwroot". Do you have any idea how to launch an .exe from my application?Code:ShellExecute(0 , 'OPEN' ,PChar(ExtractFilePath(Application.ExeName)+ '.\Application.exe'), Nil, Nil, SW_SHOW);
I don't want the app to run in the web browser. I only want to launch an application from a click of a browser button. For example, we launch a Notepad.
Thanks.
This is not possible in the Web. Anything running on the browser can't access the local disk of the user.
Imagine if when you visited a side (created by a person with bad intentions) their web page could "see" what you have in your hard drive?
This is not an IntraWeb limitation, but a security measure imposed by the browser itself. From the browser you only have access to your own page. Nothing else.
In your specific case, whatever you are trying to do with the Notepad you must find another way to do it. For instance, if you are displaying a long text file to your user, you can allow him to download the file (and open it using his own text file editor - regardless if it is notepad or anything else), or you can present the text to they using your own control (e.g. a IWMemo).

