|
-
Jun 30th, 2000, 11:43 AM
#1
Thread Starter
New Member
Hi!
My big problem is, that I can't use all paramters when i execute a programm via SHELL.
Example: I want to execute THIS
netstat -n >net.txt
which should execute netstat and write the output to a file.
"Netstat -n" works fine, but ">" or ">>" does not work!
Now I have to execute a batch file, which is not a very good solution.
Thx for your help and time
Daemon72
-
Jun 30th, 2000, 11:56 AM
#2
Hyperactive Member
redirects can't be done this way. You need to create a simple batch file which calls the program you want to run
mynetstat.bat
netstat.exe -n > net.txt
EOF
You can create this bat filedynamically in your program and kill the file when done, or just have a permenent bat file.
-
Jun 30th, 2000, 12:52 PM
#3
Monday Morning Lunatic
What you need is the CreateProcess API function...I can't give much more than that because I don't have that part of the Platform SDK on my computer. Where's Megatron?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 30th, 2000, 06:05 PM
#4
transcendental analytic
Not sure but shoud work shelling command.com
Code:
Shell "command.com netstat.exe -n > net.txt", vbMinimizedNoFocus
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|