FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper ShellExecute() terminates the program execution
Posts: 159
Joined: Wed Mar 28, 2007 01:19 PM
ShellExecute() terminates the program execution
Posted: Thu Sep 27, 2007 12:51 PM

Hi to all!
To call external programs (MSWord, Excel, Notepad, etc) in Windows XP,
I use ShellExecute() with no problems during the past years.
Lately in some machines, the FiveWin program just terminates in a ShellExecute() command line, with no error indications or logs at all.
If I reinstall the Windows XP, the problem disapears.
The customer gets very puzzled because only the FiveWin programs are affected.
In all cases, calling MSWord or Excel by OLE works normally.
Thanks in advance for sugestions.
Regards, Euclies

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
ShellExecute() terminates the program execution
Posted: Thu Sep 27, 2007 05:34 PM

Have you tried winexec("test.exe")?

Regard
Otto

Posts: 159
Joined: Wed Mar 28, 2007 01:19 PM
ShellExecute() terminates the program execution
Posted: Fri Sep 28, 2007 01:25 PM

Yes Otto, you are right!
I stopped using all the waitrun & winexec some years before when started using ShellExecute in the Windows XP.
I changed all my ShellExec calls to winexec it works fine on my computer.
I am going to test it on the customer´s site.
Thanks
Euclides

Posts: 159
Joined: Wed Mar 28, 2007 01:19 PM
ShellExecute() terminates the program execution
Posted: Thu Oct 04, 2007 02:28 PM

Hi to all,
Just to finish the post...
The WinExec worked in all XP machines who aborted the FiveWin program in the ShellExecute calls.
I had to do some strange things like:
WinExec("cmd /c start \"+GetCurDir()+"\mergeout.rtf")
but anyway... I di not reinstall the Windows again.
Regards, Euclides

Continue the discussion