Article View: borland.public.cppbuilder.nativeapi
Article #3120Re: Open cmd.exe from shortcut, execute command
From: vortic
Date: Sun, 15 Oct 2006 00:59
Date: Sun, 15 Oct 2006 00:59
20 lines
1807 bytes
1807 bytes
"Jonathan Benedicto" <invalid@nobody.com> wrote in message news:45316a45$1@newsgroups.borland.com... > vortic wrote: >>I have a VCL form application, and on a button onClick Event, I want to >>open a shortcut (CmdShortcut) pointing to cmd.exe, and run some command >>window application (SomeApp.exe) within the command window. I have no idea >>how to do this because I can't seem to use the online help very >>effectively. I can't even figure out how to execute any app or get a >>command line. > > You can either use ShellExecute or CreateProcess. Excellent. I open Cmd.exe instead of the app directly, as I like to run it through a command window because the app auto closes and I like to look at the output. I could not figure out how to get ShellExecute to open a shortcut, but that is ok. Thanks, vortic
Technical Details
Message-ID:
<453187e4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4531423c$1@newsgroups.borland.com> <45316a45$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c75cbeeeafb4b920 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "vortic" <vortic@users.sourceforge.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <4531423c$1@newsgroups.borland.com> <45316a45$1@newsgroups.borland.com> Subject: Re: Open cmd.exe from shortcut, execute command Date: Sat, 14 Oct 2006 20:59:13 -0400 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 67.68.137.17 Message-ID: <453187e4$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1160873956 67.68.137.17 (14 Oct 2006 17:59:16 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail