🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.commandlinetools
Article #324

Re: I need to pass a command to DOS

#324
From: Jens Geyer
Date: Wed, 24 Nov 2004 16:44
15 lines
1447 bytes
> I need to pass a command to DOS, but I cannot find the way to do it.
> I am currently using Delphi 5

Wrong group? Anyway:

   shellexecute( 0, 'open', 'command.com',
		'/c yourcommand', 'c:\temp', SW_SHOW);

should do it.

BTW, the name of the used command.com can be retrieved from the COMSPEC 
envioronment variable, command.com still works under NT and 2000.

HTH
JensG
Technical Details
Message-ID: <41a4ba7a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41a4b767@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: ff8f1,9a5ccda12f33e0e0
X-Google-Attributes: gidff8f1,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 24 Nov 2004 17:44:44 +0100
From: Jens Geyer <do@not.reply>
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
X-Accept-Language: de-DE, de, en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.delphi.commandlinetools
Subject: Re: I need to pass a command to DOS
References: <41a4b767@newsgroups.borland.com>
In-Reply-To: <41a4b767@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 217.235.39.205
Message-ID: <41a4ba7a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1101314682 217.235.39.205 (24 Nov 2004 08:44:42 -0700)
Lines: 18
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail