 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Darius Guest
|
Posted: Mon Nov 24, 2003 12:00 pm Post subject: WinExec |
|
|
Hi there
uses
wintypes,winprocess;
begin
winexec('edit.com', SW_Normal);
end;
Does any body know why the above code works but the below one doesnot
work?
uses
wintypes,winprocess;
begin
winexec('C:testmyfile.exe' , SW_Normal);
end;
for more inoformation, the myfile.exe is a fortran compiled and run
output file. The above line (2nd code) after running under Delphi 6
(win exp) does produce no error but no Dos box and no action of
myfile.exe and no outputfile which that myfile.exe produce.
Any help?
Best
Mo.
|
|
| Back to top |
|
 |
AlanGLLoyd Guest
|
Posted: Mon Nov 24, 2003 1:02 pm Post subject: Re: WinExec |
|
|
In article <800ca930.0311240400.a9f76bb (AT) posting (DOT) google.com>,
[email]dariush2003jp (AT) yahoo (DOT) com[/email] (Darius) writes:
| Quote: | Does any body know why the above code works but the below one doesnot
work?
uses
wintypes,winprocess;
begin
winexec('C:testmyfile.exe' , SW_Normal);
end;
|
What error code do you get from that call, and what does that error code mean.
Alan Lloyd
[email]alanglloyd (AT) aol (DOT) com[/email]
|
|
| Back to top |
|
 |
Darius Guest
|
Posted: Tue Nov 25, 2003 5:02 am Post subject: Re: WinExec |
|
|
I donot get any error code at all, problem is if I double click on
this dos base exe file in window explorer it open up the dos box run
the exe and produce a textfile named result.out but in case of using
this WinExec although no error come up but it never makes the exe
produce the result.out file and if you go to window explorer and check
the exe file property you will fins that last time it was accessed is
not the day you run the WineExec?
Any suggestion ?help?
Best
Darius
[email]alanglloyd (AT) aol (DOT) com[/email] (AlanGLLoyd) wrote in message news:<20031124080201.07346.00001891 (AT) mb-m26 (DOT) aol.com>...
| Quote: | In article <800ca930.0311240400.a9f76bb (AT) posting (DOT) google.com>,
[email]dariush2003jp (AT) yahoo (DOT) com[/email] (Darius) writes:
Does any body know why the above code works but the below one doesnot
work?
uses
wintypes,winprocess;
begin
winexec('C:testmyfile.exe' , SW_Normal);
end;
What error code do you get from that call, and what does that error code mean.
Alan Lloyd
[email]alanglloyd (AT) aol (DOT) com[/email]
|
|
|
| Back to top |
|
 |
AlanGLLoyd Guest
|
Posted: Tue Nov 25, 2003 1:19 pm Post subject: Re: WinExec |
|
|
In article <800ca930.0311242102.755abb5d (AT) posting (DOT) google.com>,
[email]dariush2003jp (AT) yahoo (DOT) com[/email] (Darius) writes:
| Quote: | I donot get any error code at all,
|
Your code does not save the returned value of the call - I meant you to change
the code to catch the returned value, display it and report the value. You
_must_ get some returned value, even if it is greater than 31 which means
success. If its less than 32 then that is a failure and has meaning.
Alan Lloyd
[email]alanglloyd (AT) aol (DOT) com[/email]
|
|
| Back to top |
|
 |
El Lorenzo Guest
|
Posted: Mon Dec 01, 2003 6:03 am Post subject: Re: WinExec |
|
|
See my reply on the Students group... Laurie..
"Darius" <dariush2003jp (AT) yahoo (DOT) com> wrote
| Quote: | Hi there
uses
wintypes,winprocess;
begin
winexec('edit.com', SW_Normal);
end;
Does any body know why the above code works but the below one doesnot
work?
uses
wintypes,winprocess;
begin
winexec('C:testmyfile.exe' , SW_Normal);
end;
for more inoformation, the myfile.exe is a fortran compiled and run
output file. The above line (2nd code) after running under Delphi 6
(win exp) does produce no error but no Dos box and no action of
myfile.exe and no outputfile which that myfile.exe produce.
Any help?
Best
Mo.
|
|
|
| Back to top |
|
 |
feardotcom Guest
|
Posted: Tue Dec 02, 2003 9:50 am Post subject: Re: WinExec |
|
|
put fmxutils.pas in you LIB folder,
declare FMXUTILS under the uses clause, then call
EXECUTEFILE('edit.com','','',sw_show);
remember to add the path of the executable.
might also be your problem with winexec('edit.com', SW_Normal);
if it is edit.com that comes with DOS/win9x then the path would be
something like this: winexec('c:windowscommandedit.com', SW_Normal);
hope that helps.
"Darius" <dariush2003jp (AT) yahoo (DOT) com> wrote
| Quote: | Hi there
uses
wintypes,winprocess;
begin
winexec('edit.com', SW_Normal);
end;
Does any body know why the above code works but the below one doesnot
work?
uses
wintypes,winprocess;
begin
winexec('C:testmyfile.exe' , SW_Normal);
end;
for more inoformation, the myfile.exe is a fortran compiled and run
output file. The above line (2nd code) after running under Delphi 6
(win exp) does produce no error but no Dos box and no action of
myfile.exe and no outputfile which that myfile.exe produce.
Any help?
Best
Mo.
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|