473,396 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 2379
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 neat if I could not only launch the application...
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 launch in a Windows Media Player. This is my...
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 invisiable. Can someone help me how i can make it...
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 button clicking and invoke the methods inside 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 am using Microsoft's article & DsoFile.dll:...
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 MS Word document over MS Word, it launches and...
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 and have the program launch AND load the contents...
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 outside of his curriculum :( My goal is create a...
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 argument? I had found how to launch an external...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.