How activate my windows app in web browser at Client side

G

Guest

I have two questions to ask. Thank you for your any help.

1. I have a windows application App.exe which displays some kind of image
file, like the Adobe viewer. The image files are stored in a directory under
wwwroot.
If I store Text file or Doc file and give the URL path, I can click the
hyperlink to them and view them in the web browser. How can I do the same
thing for my own application?

2. It seems that it is not necessary to store my image files under wwwroot.
Can I store those in other drive, say D:/images/ in the same computer? how to
configure the path and IIS to do so such that we can browser those files?
 
L

Lucas Tam

I have two questions to ask. Thank you for your any help.

1. I have a windows application App.exe which displays some kind of
image file, like the Adobe viewer. The image files are stored in a
directory under wwwroot.
If I store Text file or Doc file and give the URL path, I can click
the hyperlink to them and view them in the web browser. How can I do
the same thing for my own application?

What do you want? Your web application to access these files... or your
client side application? How are you informing your client side app
where the files are?

2. It seems that it is not necessary to store my image files under
wwwroot. Can I store those in other drive, say D:/images/ in the same
computer? how to configure the path and IIS to do so such that we can
browser those files?

Create a Virtual Directory.
 
G

Guest

Licas, Thank you for your comments.
I would like to have webbrowser to invoke my windows application and view my
image files, just like Adobe view.
Is it possible?
 
L

Lucas Tam

Licas, Thank you for your comments.
I would like to have webbrowser to invoke my windows application and
view my image files, just like Adobe view.
Is it possible?

Sort of... you can use VBA's Shell component to launch client side
applications. BUT you'll have to reconfigure IE's security settings (set
IE's security to low) for the script to work. Basically this method is
only good for an intranet and not for the internet.


Place the following code in a webpage (remember to set your security to
low):

<SCRIPT Language="VBSCRIPT">
var WshShell = new ActiveXObject("WScript.Shell");
alert("Lauching Calculator");
WshShell.Run("calc");
Pause(500)
WshShell.AppActivate("Calculator");
Pause(100);
WshShell.SendKeys ("1{+}");
Pause(500);
WshShell.SendKeys("2");
Pause(500);
WshShell.SendKeys("~");
Pause(500);
WshShell.SendKeys("*3");
Pause(500);
WshShell.SendKeys("~");
Pause(1000);
WshShell.SendKeys("^C");
WshShell.SendKeys("%{F4}");
alert("Launching Notepad!");
WshShell.Run("Notepad");
Pause(500)
WshShell.AppActivate("Notepad");
Pause(100)
WshShell.SendKeys("Calculation from calculator application: ");
WshShell.SendKeys("^V");
</SCRIPT>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top