Execute Dos command

Please discuss general Delphi programming topics here.

Execute Dos command

Postby chasoft » May 26th, 2004, 11:52 am

Hi everybody,
I want to execute Dos commands such as md, del, subst.... but I don't know how to execute them directly. The solution which I took here is to write to a bat file and execute it but I think it's too bad. So If you know how to execute Dos command directly, please show me.

Thanks you very much,
chasoft
Active Member
Active Member
 
Posts: 22
Joined: March 20th, 2003, 6:55 pm
Location: Vietnam

Postby Johnny_Bit » May 31st, 2004, 9:29 am

as far as i remember it is to execute "command.com /c "command""
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

!

Postby chasoft » June 6th, 2004, 1:00 pm

Thanks for your replying. I tried but... failed (I tried ShellExecute). So please show me a small example.

Thanks.
chasoft
Active Member
Active Member
 
Posts: 22
Joined: March 20th, 2003, 6:55 pm
Location: Vietnam

Postby Johnny_Bit » June 8th, 2004, 7:37 am

it depends on version of windows you have...

on 9x is like i said, but on NT is cdm.exe /c command commandparams
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Reply

Postby chasoft » June 8th, 2004, 2:36 pm

Oh! I'm using Windows XP Pro
chasoft
Active Member
Active Member
 
Posts: 22
Joined: March 20th, 2003, 6:55 pm
Location: Vietnam

Postby Johnny_Bit » June 9th, 2004, 6:39 am

XP is NT...

ShellExecute example still needed?
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 0 guests

cron