Page 1 of 1

to keep opened a DOS console.

Posted: Thu Apr 23, 2009 7:47 am
by zikitrake
Hi, a 'simply' question:

A best code to do this?:

Code: Select all

MyCmd.s = "dir"
MyParams.s = "c:\*.*"

;Method 1 (Keep DOS console active)
RunProgram("command.com", "/k " + MyCmd + " " + MyParams, "")

;Method 2
OpenConsole()
RunProgram("command.com", "/c " + MyCmd + " " + MyParams, "")
CloseConsole()
Thank you!

Posted: Thu Apr 23, 2009 7:51 am
by ts-soft
your both codes doesn't work!
I would think, use this:

Code: Select all

RunProgram(GetEnvironmentVariable("COMSPEC"), "/k " + MyCmd + " " + MyParams, "")
This works :wink:

Posted: Thu Apr 23, 2009 7:59 am
by zikitrake
ts-soft wrote:your both codes doesn't work!
I would think, use this:

Code: Select all

RunProgram(GetEnvironmentVariable("COMSPEC"), "/k " + MyCmd + " " + MyParams, "")
This works :wink:
:? My code works in (my) Window XP
:D But your code is more useful for anothers systems! it's works fine

Thank you!

PS: It's for AL90's PureFileMaster