I just want to use the code that I sent to you to store the result of
running calcs.exe in the text file "D:\\temp\\aclTemp.txt".
Not quite. If, for example, I ran into you on the street, and asked where
you were going, and you told me "to the bus stop" I would have no idea where
you were going, as the real destination is the destination you expect the
bus to take you to. So, when I ask what you're trying to accomplish, and you
tell me "to store the result of running cacls.exe in the text file..." you
haven't told me what you want to accomplish by doing that; you've only told
me how you want to accomplish it.
Now, when you say "I want to know which account has what right in the
directory" you're getting closer to what your business rule is. What do you
plan to do with that information?
The reason I ask this is that ASP uses scripting, and has very limited
funtionality and permissions, and it is often necessary with ASP to dow
"workarounds" to get information that is not normally available to
scripting. ASP.Net is a fully-compiled "real" programming technology, with
the entire resources of the Common Language Runtime Library, and anything
else you need, natively. If you could tell me what your business requirement
is (where is the bus taking you?) I can suggest a way to do it without the
klugy workarounds.
For example, you say you want to spawn an instance of the cmd.exe utility to
run another program. In fact, you could skip the cmd.exe utility altogether
and simply run the other program. But I don't think you really want to run
cacls.exe, and besides, you've got the command-line syntax wrong for what
you're trying to accomplish. It is almost never necessary to run a
shelled-out command-line to accomplish anything with .Net, but I need to
know what you want to do with this information first before I can advise
you.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.