Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void UpdateOutputDevice()
- {
- var UserName = "myusername";
- var Password = "mypassword";
- try
- {
- using (var client = new SshClient("127.0.0.1", UserName, Password))
- {
- client.Connect();
- var command = "powershell -Command " + "u0022" + "iotcoreaudiocontroltool d " + "u2019" +
- "{0.0.0.00000000}.{7a1b2a7e-173d-4889-8918-b813b832cd0c}" + "u2019" + "u0022";
- var cmd = client.RunCommand(command);
- var result = cmd.Result;
- SendStatus.Text = result;
- client.Disconnect();
- }
- }
- catch (Exception e )
- {
- Debug.WriteLine(e);
- SendStatus.Text = e.ToString();
- }
- }
Add Comment
Please, Sign In to add comment