473,386 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Starting a desktop app from ASP.NET

I am trying to spawn a seperate process from my asp page
so when a user clicks the link or button a desktop program
is launched. This will be on an intranet and the program
will exist on the users desktop. I can use the following
code in webmatrix to run a process on my local machine:

<%@ Page Language="VB" %>
<script runat="server">

' Insert page code here
'

Sub Button1_Click(sender As Object, e As EventArgs)
Dim startInfo As System.Diagnostics.ProcessStartInfo
startInfo = New
System.Diagnostics.ProcessStartInfo()
Dim p As System.Diagnostics.Process = New
System.Diagnostics.Process()
startInfo.FileName = "c:\8133324.txt"
startInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal
p.Start("c:\winnt\notepad.exe")
End Sub

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:Button id="Button1" onclick="Button1_Click"
runat="server" Text="Button"></asp:Button>
&nbsp;<!-- Insert content here -->
</form>
</body>
</html>
But in .NET Studio running on IIS the process doesn't
spawn. I have tried the following code:

Dim startInfo As New ProcessStartInfo("IExplore.exe")
startInfo.WindowStyle = ProcessWindowStyle.Normal
Process.Start(startInfo)

in a button click event, but nothing happens. Any help
would be greatly appreciated.
(Please send VB code, I know C# but this shop uses VB.NET
only)
John
Nov 17 '05 #1
1 2248
Are you trying to launch notepad per your example or a .net application. If
the latter, what you're talking about is href exe, a very neat feature of
..net. You should probably search msdn and the windows application .net
newsgroups.

hth
Eric
"John Wright" <jo****************@l-3com.com> wrote in message
news:Oc**************@TK2MSFTNGP12.phx.gbl...
I am trying to spawn a seperate process from my asp page
so when a user clicks the link or button a desktop program
is launched. This will be on an intranet and the program
will exist on the users desktop. I can use the following
code in webmatrix to run a process on my local machine:

<%@ Page Language="VB" %>
<script runat="server">

' Insert page code here
'

Sub Button1_Click(sender As Object, e As EventArgs)
Dim startInfo As System.Diagnostics.ProcessStartInfo
startInfo = New
System.Diagnostics.ProcessStartInfo()
Dim p As System.Diagnostics.Process = New
System.Diagnostics.Process()
startInfo.FileName = "c:\8133324.txt"
startInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Normal
p.Start("c:\winnt\notepad.exe")
End Sub

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:Button id="Button1" onclick="Button1_Click"
runat="server" Text="Button"></asp:Button>
&nbsp;<!-- Insert content here -->
</form>
</body>
</html>
But in .NET Studio running on IIS the process doesn't
spawn. I have tried the following code:

Dim startInfo As New ProcessStartInfo("IExplore.exe")
startInfo.WindowStyle = ProcessWindowStyle.Normal
Process.Start(startInfo)

in a button click event, but nothing happens. Any help
would be greatly appreciated.
(Please send VB code, I know C# but this shop uses VB.NET
only)
John

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Glenn | last post by:
I have used this code successfully in a form application. I tried to add the same code in a service and have not been able to get the application to start. I have the service starting with a local...
5
by: Steve Long | last post by:
Hello, I hope this question isn't too fundamental. I have a feeling it is. I'm trying to start a winform app from a windows service written in C#. I created a class and used it from a windowsforms...
1
by: kemp100 | last post by:
guys..i am having a hard time with this one.. i have created a service which works fine..except when i want to execute another program (notepad.exe)...i know how to execute itusing...
6
by: Arnie | last post by:
We're using the ServiceController class provided by the .NET Framework, programming in C#. We are using the Start() method to start a service from another service. This works fine most of the...
7
by: Ahmed Perlom | last post by:
Hi all, I am trying to start a windows application that has a GUI from a Windows service written in .NET 2.0. I have been searching on this for few days now with no avail. When using the...
5
by: Lamis | last post by:
Hi, i have just created my first Windows service and it is working great.. my problem is that I need to start an application in my service: protected override void OnStart(string args) {...
0
by: Mark Henry | last post by:
I wrote a Desktop class for manipulating desktops and window stations. The class is being used by a service for starting applications on the interactive desktop (the service cannot run as Local...
1
Fatali
by: Fatali | last post by:
I found a bit of code here in the forums, that modified looked like it would do what I needed: start a Windows Service. The code said I would need to add : Imports System.ServiceProcess So I...
1
by: Okonita | last post by:
Hi all, I have gone through the process of installing DB2 UDBv9 Express-C in my local linux environment. I am used to having icon placed on my Desktop or taskbar for easy access to (db2cc)...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.