|
|
|
|
![]() ![]() |
Feb 19 2006, 02:14 AM
Post
#1
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 68 Joined: 30-July 05 Member No.: 10,043 |
Hello everyone,
I need help, I need to know which function , or a user defined one should i use to call a exe from within a program, Like i use switch cases , it certain condition is encountered the exe should gets executed, that is what i want to do, I am making an operating system for my projects at university, I need that thing. So somebody please help me, This is the forum that lets me find all my solutions. I have a 100% problem solution rate here, everyone has helped me alot, Waiting for some one to post a reply. |
|
|
|
Feb 19 2006, 01:59 PM
Post
#2
|
|
|
Advanced Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 130 Joined: 21-December 05 Member No.: 15,990 |
I use such WinAPI function:
CODE WinAPI::shellExecute("c:\\program.exe", 'parameters'); It function run some program within your own program! I found this or other cooolest functions in MSDN!!! |
|
|
|
Feb 19 2006, 09:37 PM
Post
#3
|
|
|
-=Hybrid Bus=- ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 742 Joined: 2-November 05 From: My hybrid bus (in NYC), a computer Member No.: 13,709 ![]() |
In .Net programming, bring in the System.Diagnostics namespace (don't know how to do this in C++, only VB.Net), and call Process.Start("C:\program.exe"). You can find additional parameters in the Object Browser.
|
|
|
|
Feb 21 2006, 09:26 AM
Post
#4
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 68 Joined: 30-July 05 Member No.: 10,043 |
People someone please tell me how to use that in C++,I am going insane making that program.
Somebody help!!!1 |
|
|
|
Feb 22 2006, 07:11 AM
Post
#5
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 178 Joined: 13-October 04 From: NSW, Australia Member No.: 1,713 |
here's a really quick inefficient way to do it if you're absolutely desperate (and using windows):
CODE system("c:\myProgram.exe"); system just pops open a command prompt and runs the bits in the quotation marks. good luck! |
|
|
|
Feb 27 2006, 02:00 AM
Post
#6
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 399 Joined: 14-November 04 From: Elysium Member No.: 2,280 |
Add #include <cstdlib> to the beginning of the file for switch's technique.
-And if I'm correct, you don't really have to type system("c:\myProgram.exe"), you can just type system("myProgram") 1) because myProgram is assumed to be myProgram.exe 2) MS-DOS understands local commands ~I'm working on an actual Win-DOS system here, should work on an XP. |
|
|
|
Jun 4 2006, 03:51 PM
Post
#7
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 53 Joined: 4-June 06 Member No.: 24,718 |
When you run the system(FILENAME) to run another executable from within a program. This should be kept in mind while specifying the path for the FILE.
if the path is c:\fort\fort.exe it should be entered as "c:\\fort\\fort.exe"; to enter a '\' character in a string '\' should be entered twice.. therefore the function should be called as follows system("c:\\fort\\fort.exe"); Thanx for more info .. mail me at jibranbhat@gmail.com |
|
|
|
Jul 9 2008, 12:54 PM
Post
#8
|
|
|
Hail Caesar! ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 5,876 Joined: 21-September 07 Member No.: 50,369 |
How to pass the parameters to system( \\\"some.exe\\\")?
Executing An Exe From Within A Program! DThanks. This method helped me a lot , anybody know how to pass parameters in system("c:\\fort\\fort.Exe");? -reply by ashwini |
|
|
|
![]() ![]() |
Similar Topics