RunShell()

This forum is for general support of Xbase++
Post Reply
Message
Author
BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

RunShell()

#1 Post 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)
There are only 10 kinds of people - those who understand binary and those who don't :)

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: RunShell()

#2 Post 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.
Attachments
runshell.zip
(305.1 KiB) Downloaded 836 times
There are only 10 kinds of people - those who understand binary and those who don't :)

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: RunShell()

#3 Post 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.
The eXpress train is coming - and it has more cars.

BruceN
Posts: 280
Joined: Thu Jan 28, 2010 7:46 am
Location: Slidell, LA

Re: RunShell()

#4 Post 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
There are only 10 kinds of people - those who understand binary and those who don't :)

patito
Posts: 121
Joined: Tue Aug 31, 2010 9:01 pm

Re: RunShell()

#5 Post 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
Attachments
runcmd.rar
Trunprocess
(238.36 KiB) Downloaded 849 times

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: RunShell()

#6 Post by Auge_Ohr »

BruceN wrote:runshell('/c fbzip.exe')
hm ... what about

Code: Select all

runshell('/c START fbzip.exe')
greetings by OHR
Jimmy

Post Reply