string s = Form1.ipadd;
string devic;
devic = comboBox1.Text;
groupBox2.Text = devic + " Information";
ConnectionOptions _Options = new ConnectionOptions();
_Options.Username = "Babar";
_Options.Password = "";
ManagementPath _Path = new ManagementPath(s);
ManagementScope _Scope = new ManagementScope(_Path, _Options);
_Scope.Connect();
ManagementObjectSearcher srcd = new ManagementObjectSearcher("select * from "+devic);
tsprogress.Value = 0;
Allplabel.Text = " : 0%";
foreach (ManagementObject obj in srcd.Get())
{
//listBox5.Items.Add(obj.Properties.ToString());
foreach (PropertyData aProperty in obj.Properties)
{
i++;
tsprogress.Value = (i / cont) * 100;
Allplabel.Text = tsprogress.Value.ToString() + "%";
richTextBox1.AppendText(aProperty.Name.ToString() + " : " + aProperty.Value+"\n");
}
}
///////////////////////// The above code works fine on local host but does not works while accessing remote system......Accesses denied excption ...i shall b very thankful 2 your help.