Article View: borland.public.cppbuilder.nativeapi
Article #12694Re: ShellExecute Error
From: George
Date: Fri, 21 Nov 2003 07:46
Date: Fri, 21 Nov 2003 07:46
34 lines
2017 bytes
2017 bytes
Well, system() seems to be a very good solution. Do you know a way to make the window that popups to be hidden (invisible) ? With createprocess you can give the process the SW_HIDE. What about the system() ? "Bob Gonder" <notbg@notmindspring.invalid> wrote in message news:k42orvgo0cuq8t40gna3l1u57oklbuk107@4ax.com... > George wrote: > > >Hi I want to execute the following command > > > >mysqldump.exe --user=root --password=pass --database=data1 > c:\output.txt > > > >Everything works fine but that "> output.txt" seems to make it fail. If I > > The ">" is a redirection command. > Redirection is detected/started by the command proccessor. > You are not executing the command processor. > > You could use > system( "mysqldump.exe --user=root --password=pass " > " --database=data1>c:\\output.txt"); > > Or you could find the "COMSPEC" value in the environment, and execute > that with "\\C mysqldump.exe --user=root --password=pass > --database=data1 > c:\\output.txt" > > Or, you could set up your own redirection file/handle, and use > CreateProcess() which allows redirection. >
Technical Details
Message-ID:
<3fbdc0ec@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fbd4eec$1@newsgroups.borland.com> <k42orvgo0cuq8t40gna3l1u57oklbuk107@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,9b656969a1fc70df X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-20 23:39:01 PST From: "George" <george@nospam.org> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fbd4eec$1@newsgroups.borland.com> <k42orvgo0cuq8t40gna3l1u57oklbuk107@4ax.com> Subject: Re: ShellExecute Error Date: Fri, 21 Nov 2003 09:46:13 +0200 Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 213.16.182.125 Message-ID: <3fbdc0ec@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1069400300 213.16.182.125 (20 Nov 2003 23:38:20 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail