473,598 Members | 3,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click

Dim CompName
Dim program As New Process

program.StartIn fo.FileName = "\\sms13\remote $\remote.exe"

program.StartIn fo.Arguments = " 2 " & " \\" & CompName & "\"

program.Start()

Thanks for any help!
Nov 19 '05 #1
6 2384
On Wed, 27 Apr 2005 18:08:39 -0400 in
microsoft.publi c.dotnet.framew ork.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(B yVal sender As System.Object, ByVal e As
System.EventAr gs) Handles Button1.Click

Dim CompName
Dim program As New Process

program.StartI nfo.FileName = "\\sms13\remote $\remote.exe"

program.StartI nfo.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********@tel us.net> wrote in message
news:j8******** *************** *********@4ax.c om...
On Wed, 27 Apr 2005 18:08:39 -0400 in
microsoft.publi c.dotnet.framew ork.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(B yVal sender As System.Object, ByVal e As
System.EventAr gs) Handles Button1.Click

Dim CompName
Dim program As New Process

program.StartI nfo.FileName = "\\sms13\remote $\remote.exe"

program.StartI nfo.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.publi c.dotnet.framew ork.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********@tel us.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********@tel us.net> wrote in message
news:pa******** *************** *********@4ax.c om...
On Thu, 28 Apr 2005 12:41:46 -0400 in
microsoft.publi c.dotnet.framew ork.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********@tel us.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.publi c.dotnet.framew ork.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://secureinternald omain.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********@tel us.net> wrote in message
news:dp******** *************** *********@4ax.c om...
On Thu, 28 Apr 2005 13:42:57 -0400 in
microsoft.publi c.dotnet.framew ork.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://secureinternald omain.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
30949
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 but minimize the webpage's browser at the same time, but this is just icing on the cake... -dg
1
1951
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 code... <TD vAlign=top align=left><BR><A HREF="view_files/movie1.mpg"><­IMG SRC="view_files/movie1_logo.jp­g" border="0"></A></TD>
2
1149
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 visible when launch on web server. regards, Sam
5
4297
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 exe. The button clicking part is working fine, but I just cannot get the method call. Here is my program snippet. **************************************************************
4
4122
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: http://support.microsoft.com/default.aspx?scid=kb;en-us;224351) When I run it in ASP.NET, I get a "file not found" exception, even though the file does exist.
8
3659
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 opens the document. I would like my App to launch and open a document (if it has the correct extension). What is the launch event sequence and where do I pick up the path/name of the file or files that were dropped on the application icon? Any...
2
1103
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 of the clicked file. I have been able to do the first half. I can click on a .pcfs file and the program comes up. But how do I make the program "see" the clicked file and load it? I'm not even sure what this action is called, and so I haven't...
6
2737
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 program that will get feeded a url that links direcly to a file http://www.example.com/video.avi] the program will then determine if the file is there or not. There are probably more efficient ways of doing what I want to do but this is the way I...
3
2542
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 program, but I do not know how I would find the default handler to a file type. Any help is greatly appreciated. Code to launch application: ProcessStartInfo pInfo = new ProcessStartInfo();
0
8395
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8398
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8050
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8265
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5850
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5438
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3898
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2412
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1504
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.