473,769 Members | 2,100 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running an external executable within a program



Is it possible to run an external executable (.exe) from within a
program?

Let's say you have a windows form control with a button that says "Run"
and when the button is clicked, it launches a totally different
program... let's say Notepad or something.

I've been searching for a bit and can't seem to find any leads as to
where I can find information.
Any help is appreciated.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #1
2 11823
Take a look at the Process class.

"JMe9ka" <ja*********@ya hoo.com> wrote in message
news:#q******** ******@TK2MSFTN GP10.phx.gbl...


Is it possible to run an external executable (.exe) from within a
program?

Let's say you have a windows form control with a button that says "Run"
and when the button is clicked, it launches a totally different
program... let's say Notepad or something.

I've been searching for a bit and can't seem to find any leads as to
where I can find information.
Any help is appreciated.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #2
Try: System.Diagnost ics.Process.Sta rt(@"c:\windows \system32\cmd.e xe");

--
/jop

"JMe9ka" <ja*********@ya hoo.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..


Is it possible to run an external executable (.exe) from within a
program?

Let's say you have a windows form control with a button that says "Run"
and when the button is clicked, it launches a totally different
program... let's say Notepad or something.

I've been searching for a bit and can't seem to find any leads as to
where I can find information.
Any help is appreciated.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

47
3884
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
3
2462
by: Alan Dunne | last post by:
Two questions. The first and one more likely to be answered is Can you call/run a Windows executable file from within C++ source code? The executable itself runs in a DOS window and asks for user input, i.e. choose 1 to use an audio stream, 2 to read from a file, and 0 to exit. If 2 is selected a file name and path is required. I'd like to know if it is also possible to supply these parameters through the interface program as opposed to...
6
1314
by: foldface | last post by:
Hi Sorry, don't know how to phrase the question any better. Within Visual Studio I have a style sheet that being dynamically added to the code, i.e. not via the html page. I want to place this within a html page so that the VS designer can see the style sheet but the running executable can't #ifdef RUNNING_IN_VS
6
1904
by: Charles Law | last post by:
Suppose my application is running on a client machine, and they report an intermittent problem. It only occurs after the program has been running for a while, and then occasionally fails to perform correctly. I would like to be able to come along with a program I have written (or a third-party program), load it onto the client machine - without stopping the problem application - and attach to the application to receive trace information...
3
1799
by: Oenone | last post by:
In VB6, it's possible to create a project with a class library within it. The project can then be run with F5, and it sits and waits for an external process to create an instance of one of its objects. This is extremely useful, as it allows me (for example) to create a PlugIn class running in source, and call it from a host application that is running as an executable. In VB.NET, I'm not allowed to run class library projects, I simply...
2
1961
by: wakun | last post by:
Hi there, I have my webpage written in C# and I am going to run an external program within the web page. I have my code like using System; using System.Diagnostics; namespace NRP { public class RP:System.Web.UI.Page
2
2560
by: Ollie | last post by:
Hi I am trying to start up a labview file from within my C program. Whats the easiest way to start an external program up ? I looked at _execl but could not make any sense of the arguments and parameters and am not sure if this is the best way to proceed. Regards
1
2591
Banfa
by: Banfa | last post by:
The situation is this I have a VB program and a DLL writen in C. The DLL and executable both get built to the same location and work fine when the executable is run. This is also the directory that contains the VB source code and project files. However I now need to alter the VB program, when I load the project into VB6 and press the run button I get error 53 (file not found) on the DLL file despite the fact that it actually resides in the...
51
4158
by: Ojas | last post by:
Hi!, I just out of curiosity want to know how top detect the client side application under which the script is getting run. I mean to ask the how to know whether the script is running under Command Prompt or Browser or some other application? Ojas.
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9422
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10038
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
9987
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
9857
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...
0
8867
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7404
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
5294
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
3952
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

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.