469,282 Members | 2,120 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

File not found when I try to launch and EXE from a webpage

I'm working on you first asp.net project and its just a conversion of an
existing vb.net project I have.

I am trying to have the user push a button and execute a program from a
share on the network.

I get "the system cannot find the file specified", but the file is there and
works fine from a gui..

Here is the sun that is not working

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim CompName
Dim program As New Process

program.StartInfo.FileName = "\\sms13\remote$\remote.exe"

program.StartInfo.Arguments = " 2 " & " \\" & CompName & "\"

program.Start()

Thanks for any help!
Nov 19 '05 #1
6 2220
On Wed, 27 Apr 2005 18:08:39 -0400 in
microsoft.public.dotnet.framework.aspnet, "Microsoft" <ma*@mas.com>
wrote:
I get "the system cannot find the file specified", but the file is there and
works fine from a gui..

Here is the sun that is not working

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim CompName
Dim program As New Process

program.StartInfo.FileName = "\\sms13\remote$\remote.exe"

program.StartInfo.Arguments = " 2 " & " \\" & CompName & "\"

program.Start()

Thanks for any help!


Try setting the 'Filename' property with a fully qualified filename.
(By using Server.MapPath() for example). I suspect it is looking in
your Windows directory to find the file.

Roger

Nov 19 '05 #2
Thanks for the response..

The file is located on a server that is remote to the Webserver and I want
the file to launch on the client. Its a small app.
I'm not sure how server.mappath would help.
"Roger Helliwell" <rh********@telus.net> wrote in message
news:j8********************************@4ax.com...
On Wed, 27 Apr 2005 18:08:39 -0400 in
microsoft.public.dotnet.framework.aspnet, "Microsoft" <ma*@mas.com>
wrote:
I get "the system cannot find the file specified", but the file is there andworks fine from a gui..

Here is the sun that is not working

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim CompName
Dim program As New Process

program.StartInfo.FileName = "\\sms13\remote$\remote.exe"

program.StartInfo.Arguments = " 2 " & " \\" & CompName & "\"

program.Start()

Thanks for any help!


Try setting the 'Filename' property with a fully qualified filename.
(By using Server.MapPath() for example). I suspect it is looking in
your Windows directory to find the file.

Roger

Nov 19 '05 #3
On Thu, 28 Apr 2005 12:41:46 -0400 in
microsoft.public.dotnet.framework.aspnet, "Microsoft" <ma*@mas.com>
wrote:
Thanks for the response..

The file is located on a server that is remote to the Webserver and I want
the file to launch on the client. Its a small app.
I'm not sure how server.mappath would help.
"Roger Helliwell" <rh********@telus.net> wrote in message
news:j8********************************@4ax.com.. .


You want the file to be executed on the client? The way you have
things set up is definitely not the way to go if that's the case.

Executing .exe's on a client's machine is a huge problem. (Imagine the
security risk!) You'll need to use ActiveX or something similar to do
what you're doing.

Roger
Nov 19 '05 #4
Oh... I moved the file to the server and changed the path and now it
launches fine, but as you said it runs on the server
This is for an internal site of our company. The site is in the trusted
sites of the browsers that are using the site, so security should not be an
issue. There's not a VB command I can use?
"Roger Helliwell" <rh********@telus.net> wrote in message
news:pa********************************@4ax.com...
On Thu, 28 Apr 2005 12:41:46 -0400 in
microsoft.public.dotnet.framework.aspnet, "Microsoft" <ma*@mas.com>
wrote:
Thanks for the response..

The file is located on a server that is remote to the Webserver and I wantthe file to launch on the client. Its a small app.
I'm not sure how server.mappath would help.
"Roger Helliwell" <rh********@telus.net> wrote in message
news:j8********************************@4ax.com.. .


You want the file to be executed on the client? The way you have
things set up is definitely not the way to go if that's the case.

Executing .exe's on a client's machine is a huge problem. (Imagine the
security risk!) You'll need to use ActiveX or something similar to do
what you're doing.

Roger

Nov 19 '05 #5
On Thu, 28 Apr 2005 13:42:57 -0400 in
microsoft.public.dotnet.framework.aspnet, "Microsoft" <ma*@mas.com>
wrote:
Oh... I moved the file to the server and changed the path and now it
launches fine, but as you said it runs on the server
This is for an internal site of our company. The site is in the trusted
sites of the browsers that are using the site, so security should not be an
issue. There's not a VB command I can use?


No. To run an executable on a client's machine. You would first have
to load it onto the client's machine. Then execute it.

However, if the executable is .NET (managed) code, you could have a
link that points to the exe. Something like:

<a href="http://secureinternaldomain.com/myapp.exe">Run this App</a>

This is how a "Smart Client" application would run on a client
machine. There is lots of info on msdn.com if this is what you're
after.

Roger

Nov 19 '05 #6
Its actually a Piece of SMS2003. The remote Gui. copies of it are located
on the client and on our network in general.. I can point to either..

Its not .net managed code, but I could make a virtual directory point to it.
Other than executing the client I have an example webpage from someone who
does exactly what I want to do, but its in asp, not asp.net so unless I can
figure out how to call his page and send values to it, I would have to
rewrite my entire web app using asp.

The Exe I want to execute is in exactly the same place on every client, so I
hope that makes it easier.

Can you point me to where on MSDN they discuss launching apps on the client.
I can't find it.. Thank you for all the help.
"Roger Helliwell" <rh********@telus.net> wrote in message
news:dp********************************@4ax.com...
On Thu, 28 Apr 2005 13:42:57 -0400 in
microsoft.public.dotnet.framework.aspnet, "Microsoft" <ma*@mas.com>
wrote:
Oh... I moved the file to the server and changed the path and now it
launches fine, but as you said it runs on the server
This is for an internal site of our company. The site is in the trusted
sites of the browsers that are using the site, so security should not be anissue. There's not a VB command I can use?


No. To run an executable on a client's machine. You would first have
to load it onto the client's machine. Then execute it.

However, if the executable is .NET (managed) code, you could have a
link that points to the exe. Something like:

<a href="http://secureinternaldomain.com/myapp.exe">Run this App</a>

This is how a "Smart Client" application would run on a client
machine. There is lots of info on msdn.com if this is what you're
after.

Roger

Nov 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Eric | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.