Guest sanderd Posted June 10, 2004 Posted June 10, 2004 (edited) Hey there, been a long time since last post. I'm trying to create a little commandline interface program, and for example when I type test.exe /? he needs to show me all the switches Run(@comspec & " /c echo here the text","",@sw_hide) I tried that thing, but when I try to run my app, I don't get returned anything?! Btw, I'm using WinXP Pro (so I don't need to know how to detect the switches, only to echo something) grtz SanderD Edited June 10, 2004 by sanderd
pekster Posted June 10, 2004 Posted June 10, 2004 Something like this? Run(@comspec & " /k echo some text here") The k switch keeps the window open (the c would close it right away after the echo, which is rather pointless.) Also, don't use the hide flag unless you want the window to be hidden from the user. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
bobheart Posted June 10, 2004 Posted June 10, 2004 Print to txt . Run(@comspec & " /k echo here's the text > myfile.txt","",)
pekster Posted June 10, 2004 Posted June 10, 2004 That code will print it to a file for viewing there, but I think the original question was how to display some information in a dos prompt similar to what you get in windows when you type "command /?" Also, the code shouldn't require the extra paramaters if they are blank on the end. Lastly, why use the k switch to the Command Interperter if you are dumping it to a file anyway? It will just keep an empty dos prompt open (since it will echo to the file, not the screen.) [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now