Open a desktop application from asp.net form button control?

K

Kathy Burke

Hi,

I need (if possible) to open a desktop application (vb windows app) from
a button on an aspx form. How can this be done so that the app opens on
desktop not within the browser?

TIA for any help.

Kathy
 
K

Kevin Spencer

What exactly are you trying to achieve here? In other words, what is the
requirement of your app?

--
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
K

Kathy Burke

Kevin, not sure how to explain it differently...but I'll try.

From within an aspx page (IE 5.5), I want to click on a button, which
would open a desktop application (shell?), but not interrupt my browser
app/session.

This is to allow users to use a separate vb windows app in parallel with
the asp.net app.

Kathy
 
K

Kevin Spencer

Requirements are what you want your program to accomplish, not how you want
it to accomplish it. What are the goals as far as what the app delivers to
the user? For example, what is this VB application, and what does it do for
the user?

--
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
K

Kathy Burke

The VB app is simply a business requirement for data collection that can
NOT be integrated into my asp.net app (per corporate directive).
Therefore, I would like a button to open it from the asp.net app simply
for user convenience.

Why on earth would I need to describe what my entire app is designed for
when my question was quite simple: looking for code to open a windows
executable file from within an asp.net page.

From what I could find so far, it appears that shell may be what's
needed. Just hoping for an example from someone. That's all!

I found something posted but wasn't sure if this was the best way to go,
and/or how to write the cmd line to run a vbapp.exe file.

dim wsh
set wsh = createobject("WScript.Shell")
response.write wsh.run("cmd /c C:\WINNT\system32\ping.exe " & _
"www.aspfree.com > " & server.mappath("pingresults.txt"))

set wsh = nothing
response.redirect "pingresults.txt"

Thanks,

Kathy
 
K

Kevin Spencer

The reason I asked what your requirements are is that launching an
executable from a browser is usually a very bad idea, and by looking at your
requirements an alternative could possibly be arrived at, based upon the
requirements. Quite often the solution one arrives at initially can turn out
to be impractical, and a fresh look at the requirements can often provide
alternative and better solutions.

--
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
K

Kathy Burke

Sorry, Kevin, not trying to be difficult and I appreciate your help.

I did leave out (oops) that this is an Intranet app used in very
controlled circumstances. I can see now that your concern was probably
tied to the wider implications of Internet users, etc.

So, any advice on how to do what I want? Our users complain when they
have to "do" too much with the app, so we thought a button that will
open up the windows app needed in parallel would make it "easier" on
them.

Thanks,

Kathy
 
K

Kevin Spencer

The simplest method is to link to the executable file. The browser will
offer the user a choice of either saving or running the file. In either
case, it will be saved to the local machine. If they select to execute it,
it will run from the Temporary Internet Files folder.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Joined
Jul 6, 2006
Messages
1
Reaction score
0
Is there any way at all, to launch a windows app from a web app.

I've found that as result of legacy integration of old asp apps and new asp.net apps, there is great need for the ability for launching windows apps from web apps - exactly my issue with a incredible short deadline to boot.

I'm at present attempting to print a dynamically database generated graphic to a printer. I was able to create a printer class that would be used by an asp.net web form only to learn by research that the asp.net page object destroyed before the asynchronous print operation could complete (something windows apps takes care of naturally). Anyway, to make a long story short, I eventually moved to breakin' off the printing operation to a separate activity by wrapping my print class in a windows class library and perfecting the database printing process to printer; hoping to eventually discover the 'magic' code to that would launch this windows app (my final printer class wrapper) to instantly trigger the printing process.

In short, I must send formally generated documents that users are not allowed to view to a printer from already developed asp and asp.net applications (like yesterday) on the company's intranet.

I would appreciate any help anyone can offer.

Many thanks in advance,

Jose.
 

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
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top