|
Rank: Newbie Groups: Member
Joined: 3/21/2020 Posts: 9
|
Hi Team,
If we put path/url of an .exe file in Chrome/IE ,it will simply download if not present or open if present accordingly and hence the application(.exe) is launched. Do we any such property or method in EO Browser that handles this thing. So that we can just launch/run the exe file without any base control/ form?
ThreadRunner threadRunner = new ThreadRunner(); //Create a WebView through the ThreadRunner WebView webView = threadRunner.CreateWebView(); threadRunner.Send(() => { //Load Google's home page webView.LoadUrl("Fullpath\abc.exe"); });
I have tried the above code so that the .exe file can run independent of any control/form. But this is also not working.
Kindly let me know asap if there is any way that we can execute exe file through EO browser.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
It works the same way in EO.WebBrowser. If you try it with the TabbedBrowser sample application, you will see the same behavior. You do not see it working in your code probably because you did not leave the ThreadRunner alive long enough ---- all download events are asynchronous so nothing has really started yet when your LoadUrl returns. However if you just leave the code there you will see file download dialog appears.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 3/21/2020 Posts: 9
|
Thanks for the response. How can I let tit wait so that it can show the user the required exe. Also, I want to execute the exe if it already exists. I tried with the same code to run a local exe but it did not executed. Can you please provide me some more details so that I can solve this problem. Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
It won't execute the exe file. It will download it.
You don't have to do anything to let it wait. Just make sure your program doesn't exit. For example if you have a Windows Form application with a button, you can run your code in the button's Click event handler and you will see the download dialog.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 3/21/2020 Posts: 9
|
Thanks for your reply.
Approximately for how long shall we wait and where can we see the download dialog. As we see the download dialog in chrome, can we see it for EO browser as well?
I want to execute a .exe, that means I want to launch a new application from WPF application. Is there any way we can do so.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, You should see the download dialog right away. As a test, you can open the source code of our TabbedBrowser sample application, then add your code inside App.xaml.cs BEFORE this line:
Code: C#
MainWindow mainWnd = new MainWindow();
Run it and you should see the download dialog. We have already told you the browser engine won't execute the exe file. So however you want to execute the exe file would not have anything to do with EO.WebBrowser. Thanks!
|
|