Full Threaded Shellicious

I couldn't resist adding some features to Shellicious. You can now run shell commands either asynchronously (as before) or synchronously, like so:


This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2004/11/full-threaded-shellicious.html

I don’t know if anyone would get this message and reply but I post it as I am desparate to solve a problem. Thanks for the above program I have got alot out of it and I used on NTBased Windows and it works fine. But for windows 98 it doesn’t return anything. I replaced the cmd.exe with command.com but still doesn’t work.

Anyone has any idea how to fix this problem, it is much appreciated.

Please send an email to behdadd@hotmail.com

Great stuff! I have ported your work over to C#, posted below for the use of those who prefer it :slight_smile:

I have a question for you too - I too wish to implement this for use on a webserver, whereby I need to call a seperate exe each time the website user requests a certain function. Did you ever have any worries about the performance of doing this (ie. calling an external exe), it doesn’t seem as ‘nice’ to me as calling a referenced dll, but in this case that’s not an option. I’m not sure whether I should be looking for another solution, or if my concerns over the performance and scalability of calling an external exe are unfounded… Any advice would be greatly appreciated :slight_smile:

[ code removed – c# version of Shell posted here ]

http://www.codinghorror.com/blog/archives/000134.html