Re: Verification - WeOnlyDo Discussion board

Re: Verification (General questions)

by schenkp, Friday, November 18, 2011, 18:52 (4565 days ago) @ woddrazen

THis is the code that we are currently using in production.... Just not sure how to intergrate it into the above code.

WeOnlyDo.Client.SSH ssh1 = new WeOnlyDo.Client.SSH();

System.Collections.IDictionary envVars = Environment.GetEnvironmentVariables();

string endVLC = killall -q vlc ;

String hostname_value = ;

private void data(string streamPath)
{
System.Collections.IDictionary envVars = Environment.GetEnvironmentVariables();

foreach (System.Collections.DictionaryEntry envVar in envVars)
{

if (envVar.Key.ToString() == ThinConnectedFrom )
{
hostname_value = envVar.Value.ToString();
}
}

WeOnlyDo.Client.SSH ssh1 = new WeOnlyDo.Client.SSH();
ssh1.Hostname = hostname_value;
ssh1.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.SSHAuto;
ssh1.Login = user ;
ssh1.Password = user ;
ssh1.Blocking = true;
ssh1.Command = streamPath;

try
{
ssh1.LicenseKey = XXXX ;
ssh1.Connect();
String result = ssh1.Receive();
System.IO.File.WriteAllText( C:\Temp\TV.txt , result);

}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}

}


Complete thread: