472,351 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 2337
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: dan glenn | last post by:
I want to use some javascript to launch a windows application (this used on intranet) but don't know how. Can anyone help me out please? It'd be...
1
by: Lyndon | last post by:
Hi guys, I've got a problem... I'm developing a webpage on my computer and I can't get the links to my MPEG movies to work. I want them to...
2
by: nss | last post by:
hi, I created web page ( .aspx) then i imported datagrid on that page with dataset. But when i launch the page on web server the datagrid is...
5
by: RickDee | last post by:
Please help, anybody. I am trying to write a program so that it can launch an exe file ( which is also genereated in C# ) and then simulate the...
4
by: Eric | last post by:
Hello, I am having some sort of security issue with my code. When I change a file's title in a Windows or console app, I have no problems. (I...
8
by: Paul | last post by:
I have looked and looked for this info. All the I/O examples I've found either explicity use a file name or use the OpenFileDialog. When you drag a...
2
by: bidalah | last post by:
Hi, I have created a program which opens up ".pcfs" files, a kind of text file unique to my program. I want to be able to click on these files...
6
by: Daniel Padron | last post by:
Ok. Maybe I shouldnt post such basic questions here in such an advanced group but my high school programming teacher wont answer any questions...
3
by: LordHog | last post by:
Hello, How would I go about finding the default handler, let's say a text file (*.txt), then launch the default handler with the file as an...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....

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.