By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,144 Members | 880 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,144 IT Pros & Developers. It's quick & easy.

Launch an interactive window from ASP.NET

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.