473,569 Members | 2,526 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Launch an interactive window from ASP.NET

Hello,

I need to allow a web page to launch an interactive program on the web
server. For this example, I'd like to have the ASP.NET open notepad on the
asp server, so the current logged-in user can see it.

Here's the code I have implemented. Notepad starts, but is not visible on
the server desktop.

*************** *************
Dim commandPrompt As New System.Diagnost ics.Process
Dim ps As New System.Diagnost ics.ProcessStar tInfo("notepad. exe")

ps.UseShellExec ute = False
ps.RedirectStan dardInput = False
ps.RedirectStan dardOutput = False
ps.RedirectStan dardError = False
ps.WorkingDirec tory = "c:\"
ps.CreateNoWind ow = false
ps.WindowStyle = 3

Dim proc As System.Diagnost ics.Process = commandPrompt.S tart(ps)

*************** *************

Thanks for your help.

Eric
Nov 19 '05 #1
4 1810
Why do you want this? The users of your asp.net application are going to be
sitting at their desk accessing your site. So this would not apply to them.

If the person logged into the server needs notepad, why are they browsing
to a site located on the same machine, instead of just running an executable
locally that can launch appropriate programs?

"Eric" <er***@nextivr. com> wrote in message
news:O3******** ********@TK2MSF TNGP09.phx.gbl. ..
Hello,

I need to allow a web page to launch an interactive program on the web
server. For this example, I'd like to have the ASP.NET open notepad on
the asp server, so the current logged-in user can see it.

Here's the code I have implemented. Notepad starts, but is not visible on
the server desktop.

*************** *************
Dim commandPrompt As New System.Diagnost ics.Process
Dim ps As New System.Diagnost ics.ProcessStar tInfo("notepad. exe")

ps.UseShellExec ute = False
ps.RedirectStan dardInput = False
ps.RedirectStan dardOutput = False
ps.RedirectStan dardError = False
ps.WorkingDirec tory = "c:\"
ps.CreateNoWind ow = false
ps.WindowStyle = 3

Dim proc As System.Diagnost ics.Process = commandPrompt.S tart(ps)

*************** *************

Thanks for your help.

Eric

Nov 19 '05 #2
Normally a server is running without anyone attending it.
Therefore the default ASPNET user account does not have a desktop.
However, not all hope is lost.
Go into Administrative Tools, Services.
Right click on the WWW Service and select properties.
On the "Log On" tab you'll see a checkbox that says "Allow service to
interact with desktop".
Play around with these settings and you might be able to get it to work the
way you envision.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Eric" <er***@nextivr. com> wrote in message
news:O3******** ********@TK2MSF TNGP09.phx.gbl. ..
Hello,

I need to allow a web page to launch an interactive program on the web
server. For this example, I'd like to have the ASP.NET open notepad on
the asp server, so the current logged-in user can see it.

Here's the code I have implemented. Notepad starts, but is not visible on
the server desktop.

*************** *************
Dim commandPrompt As New System.Diagnost ics.Process
Dim ps As New System.Diagnost ics.ProcessStar tInfo("notepad. exe")

ps.UseShellExec ute = False
ps.RedirectStan dardInput = False
ps.RedirectStan dardOutput = False
ps.RedirectStan dardError = False
ps.WorkingDirec tory = "c:\"
ps.CreateNoWind ow = false
ps.WindowStyle = 3

Dim proc As System.Diagnost ics.Process = commandPrompt.S tart(ps)

*************** *************

Thanks for your help.

Eric

Nov 19 '05 #3
I am using this as a "push" to the machines in our intranet.

I need to launch applications on the client machines. I suppose there is a
better way to create a network stream on the client, listening for commands
from the server. I'm trying to use the Web server as an easy out.

Do you know of a .NET class I should be using? NetworkStream?

Eric

"Marina" <so*****@nospam .com> wrote in message
news:On******** ********@tk2msf tngp13.phx.gbl. ..
Why do you want this? The users of your asp.net application are going to
be sitting at their desk accessing your site. So this would not apply to
them.

If the person logged into the server needs notepad, why are they browsing
to a site located on the same machine, instead of just running an
executable locally that can launch appropriate programs?

"Eric" <er***@nextivr. com> wrote in message
news:O3******** ********@TK2MSF TNGP09.phx.gbl. ..
Hello,

I need to allow a web page to launch an interactive program on the web
server. For this example, I'd like to have the ASP.NET open notepad on
the asp server, so the current logged-in user can see it.

Here's the code I have implemented. Notepad starts, but is not visible
on the server desktop.

*************** *************
Dim commandPrompt As New System.Diagnost ics.Process
Dim ps As New System.Diagnost ics.ProcessStar tInfo("notepad. exe")

ps.UseShellExec ute = False
ps.RedirectStan dardInput = False
ps.RedirectStan dardOutput = False
ps.RedirectStan dardError = False
ps.WorkingDirec tory = "c:\"
ps.CreateNoWind ow = false
ps.WindowStyle = 3

Dim proc As System.Diagnost ics.Process = commandPrompt.S tart(ps)

*************** *************

Thanks for your help.

Eric


Nov 19 '05 #4
Hi Steve,

I've tried setting "Interact with desktop" for the www server, but that
didn't help.

Eric

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:Og******** ********@TK2MSF TNGP11.phx.gbl. ..
Normally a server is running without anyone attending it.
Therefore the default ASPNET user account does not have a desktop.
However, not all hope is lost.
Go into Administrative Tools, Services.
Right click on the WWW Service and select properties.
On the "Log On" tab you'll see a checkbox that says "Allow service to
interact with desktop".
Play around with these settings and you might be able to get it to work
the way you envision.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Eric" <er***@nextivr. com> wrote in message
news:O3******** ********@TK2MSF TNGP09.phx.gbl. ..
Hello,

I need to allow a web page to launch an interactive program on the web
server. For this example, I'd like to have the ASP.NET open notepad on
the asp server, so the current logged-in user can see it.

Here's the code I have implemented. Notepad starts, but is not visible
on the server desktop.

*************** *************
Dim commandPrompt As New System.Diagnost ics.Process
Dim ps As New System.Diagnost ics.ProcessStar tInfo("notepad. exe")

ps.UseShellExec ute = False
ps.RedirectStan dardInput = False
ps.RedirectStan dardOutput = False
ps.RedirectStan dardError = False
ps.WorkingDirec tory = "c:\"
ps.CreateNoWind ow = false
ps.WindowStyle = 3

Dim proc As System.Diagnost ics.Process = commandPrompt.S tart(ps)

*************** *************

Thanks for your help.

Eric


Nov 19 '05 #5

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

Similar topics

2
7799
by: Charles Krug | last post by:
List: I'm trying to us pylab to see what I'm doing with some DSP algorithms, in case my posts about convolution and ffts weren't giving it away. I've been using pylab's plot function, but I'm finding it a bit cumbersome. It works, but if I switch from the interactive window to the plot window and back, the plot window gets trashed.
2
7304
by: siggy2 | last post by:
Hi All, (sorry for my bad english) I wrote a __tiny__ and __stupid__ recursive script directly into pythonwin interactive window with a time.sleep(1) and a print before each recursion... I should have taken a closer look at the ending condition (never satisfied!), anyway I was quite confident that a control-C would have stopped the...
4
2387
by: aure_bobo | last post by:
Hi all, I'm currently developping a web app, and this one must be compatible with IE and Mozilla Firefox. In this webapp, I would like to launch automatically a anchor link (href) with a javascript script. My Javascript script works fine with IE but not with Mozilla Firefox. Here is my script : <script language="Javascript">
2
1675
by: Steve Parks | last post by:
Using server-side code, how do I launch a new window? I have an ASP.Net application that uses a frameset, yet I have some (crystal) reports I want to view in a separate window. I can probably launch a window with client-side code, but would prefer to launch it from server-side code. Thank you. Steve
7
2617
by: Paul | last post by:
Hi. I need to launch a windows application and then send keyboard event to this process to run certain commands. I've created a COM+ appplication to spawn and talk to the application which works well however the launched application always shows the UI where-as I need this to be hidden, even calling the windowhidden on the process strart...
1
2182
by: Jacob | last post by:
I have several web apps that I want to redirect to a new page, but have that page open in a new browser window. The basic scenario is that I have a CrystalReport object that gets created and displayed on-screen as a .PDF stream. I need to have this page launch in it's own window leaving the first browser alone Here's the code I'm using to...
3
2018
by: Scott | last post by:
I wish to have a link on a page that launches a new browser before it loads the target link. The standard _new and _blank include the parent browser's cookies. Is there an alternative method that excludes these cookies? Thanks in advance
6
5204
by: Ronald S. Cook | last post by:
How do I launch, say, Microsoft Word from within a C# Win app? Word should launch exterior to my app, of course. Is it easy to set size and position of where Word window will be placed? Thanks, Ron
8
1978
by: Marcus | last post by:
I have this application I have made that I launch when the user logs into Windows XP. I would like to delay the launch of the application so that it starts 1 minute after the user has logged in. I previously did this with a sleep at the first row of the source code, but this makes the process visible in the task manager's processes tab...
0
8125
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.