-
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
-
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.
-
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?
-
Not sure but shoud work shelling command.com
Code:
Shell "command.com netstat.exe -n > net.txt", vbMinimizedNoFocus