468,507 Members | 1,531 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,507 developers. It's quick & easy.

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.Diagnostics.Process
Dim ps As New System.Diagnostics.ProcessStartInfo("notepad.exe")

ps.UseShellExecute = False
ps.RedirectStandardInput = False
ps.RedirectStandardOutput = False
ps.RedirectStandardError = False
ps.WorkingDirectory = "c:\"
ps.CreateNoWindow = false
ps.WindowStyle = 3

Dim proc As System.Diagnostics.Process = commandPrompt.Start(ps)

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

Thanks for your help.

Eric
Nov 19 '05 #1
4 1637
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****************@TK2MSFTNGP09.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.Diagnostics.Process
Dim ps As New System.Diagnostics.ProcessStartInfo("notepad.exe")

ps.UseShellExecute = False
ps.RedirectStandardInput = False
ps.RedirectStandardOutput = False
ps.RedirectStandardError = False
ps.WorkingDirectory = "c:\"
ps.CreateNoWindow = false
ps.WindowStyle = 3

Dim proc As System.Diagnostics.Process = commandPrompt.Start(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****************@TK2MSFTNGP09.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.Diagnostics.Process
Dim ps As New System.Diagnostics.ProcessStartInfo("notepad.exe")

ps.UseShellExecute = False
ps.RedirectStandardInput = False
ps.RedirectStandardOutput = False
ps.RedirectStandardError = False
ps.WorkingDirectory = "c:\"
ps.CreateNoWindow = false
ps.WindowStyle = 3

Dim proc As System.Diagnostics.Process = commandPrompt.Start(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****************@tk2msftngp13.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****************@TK2MSFTNGP09.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.Diagnostics.Process
Dim ps As New System.Diagnostics.ProcessStartInfo("notepad.exe")

ps.UseShellExecute = False
ps.RedirectStandardInput = False
ps.RedirectStandardOutput = False
ps.RedirectStandardError = False
ps.WorkingDirectory = "c:\"
ps.CreateNoWindow = false
ps.WindowStyle = 3

Dim proc As System.Diagnostics.Process = commandPrompt.Start(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.net> wrote in message
news:Og****************@TK2MSFTNGP11.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****************@TK2MSFTNGP09.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.Diagnostics.Process
Dim ps As New System.Diagnostics.ProcessStartInfo("notepad.exe")

ps.UseShellExecute = False
ps.RedirectStandardInput = False
ps.RedirectStandardOutput = False
ps.RedirectStandardError = False
ps.WorkingDirectory = "c:\"
ps.CreateNoWindow = false
ps.WindowStyle = 3

Dim proc As System.Diagnostics.Process = commandPrompt.Start(ps)

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

Thanks for your help.

Eric


Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Charles Krug | last post: by
4 posts views Thread by aure_bobo | last post: by
2 posts views Thread by Steve Parks | last post: by
7 posts views Thread by Paul | last post: by
1 post views Thread by Jacob | last post: by
6 posts views Thread by Ronald S. Cook | last post: by
8 posts views Thread by Marcus | last post: by
3 posts views Thread by gieforce | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.