How can I run DOS commands from WINRT App (C#.net)

How can I run command-Line from Windows RT Application (C#.net) for example:

netstat
ipconfig /renew

...etc

I don't want to use API for network, library for graphics- just running commands and read result.

Upvotes: 0

Views: 854

Answers (1)

Scott Chamberlain
Scott Chamberlain

Reputation: 127543

To run the commands you would need to use the Process class.

However, the Process class is not available to WINRT applications so you can not do what you want to do as a WINRT application, you would need to build your program as a desktop application to be able to do it.

If you don't want to or can't re-write your program as a desktop application I would recommend learning how to call the proper WINRT APIs for the network information.

Upvotes: 3

Related Questions