Page 1 of 1

RunShell()

Posted: Sat Nov 13, 2010 11:48 am
by BruceN
Has anything changed in runshell between builds 331 and 355?
This works fine in 331:

runshell('/c fbzip.exe')

But in 355 I get an error. Doesn't matter if I put whole path in or just eXE name (which is in curDir)

here's the error:
ERROR LOG of "D:\alaska\altwin355\Util\BkupPRG\BKUPPRG.EXE" Date: 11/13/2010 12:43:35

Xbase++ version : Xbase++ (R) Version 1.90.355
Operating system : Windows Vista 06.01 Build 07600
------------------------------------------------------------------------------
oError:args :
-> VALTYPE: C VALUE: /c fbzip.exe
oError:canDefault : Y
oError:canRetry : Y
oError:canSubstitute: N
oError:cargo : NIL
oError:description : Operating system error
oError:filename :
oError:genCode : 40
oError:operation : RunShell
oError:osCode : 2
oError:severity : 2
oError:subCode : 4
oError:subSystem : BASE
oError:thread : 1
oError:tries : 1
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from MAIN(55)

Re: RunShell()

Posted: Sat Nov 13, 2010 7:34 pm
by BruceN
It seems to be a windows 7 issue... if I run it on xp it runs fine. When I run it on win 7 I get the error. Is there a change in commamd line syntrax for win 7 within xbase?

When I run the command from a command prompt in win 7, it runs fine... but when I try to do it with a runshell wirhin an EXE, I get the error.

Attached is a complete setup...with a simple command line compression utility, files, and everything.

any help will be appreciated.

Re: RunShell()

Posted: Sun Nov 14, 2010 12:42 pm
by rdonnay
The /c option is asking to open up a command shell. This may be due to the non-support of DOS programs under Windows 7.

Re: RunShell()

Posted: Sun Nov 14, 2010 4:32 pm
by BruceN
I don't think so... it works fine if I open a command prompt and type in the command, but not when I run it thru a RunShell() in xbase. Also, I found out today that it works fine on 2008 server (which I think is 7 based). I'm gong to try it on some other win 7 machines and see if it's every win 7 or just my developmnt notebook (for some reason). But thanks for the thought.

bruce

Re: RunShell()

Posted: Tue Nov 16, 2010 10:59 am
by patito
Hi Bruce

Try to use the following program, and say to me if it has problem
CreateProcess Function
http://msdn.microsoft.com/en-us/library ... S.85).aspx

Best Regard
Hector

Re: RunShell()

Posted: Tue Nov 16, 2010 1:21 pm
by Auge_Ohr
BruceN wrote:runshell('/c fbzip.exe')
hm ... what about

Code: Select all

runshell('/c START fbzip.exe')