Can we execute a batch file (*.bat) using Application Domain?
No. AppDomain is a purely CLRs' concept, whereas *.bat files are executed "inside" usual Windows.
Application Domains are a purely CLR concept, they have no relevancy to anything that's not a managed library, thus there's no way to run a batch file within an appdomain. The Process object that the batch file runs under will be tied to one specific appdomain, but it will still result in a separate process being instantiated to run your batch file.
There's some fairly good explanatory text under Remarks in the MSDN AppDomain Class documentation that should help you get a handle on what precisely an appdomain is, and what you can and can't do with one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With