rgouette
New member
I'm trying to insert a parameter for hostname in the following code:
When I insert this to debug: MessageBox.Show("Scope Path:" + "\r\n" + scope.Path);
The path simply contains :
Pretty new to C#, so I'm sure it's something easy...
Thanks much & Cheers,
Rich
C#:
ManagementScope scope =
new ManagementScope(
"\\\\{mySvrToCheck}\\root\\cimv2", options);
scope.Options.Context.Add("mySvrToCheck", svrToCheck); //<----???
scope.Options.Impersonation = System.Management.ImpersonationLevel.Impersonate;
scope.Connect();
The path simply contains :
Pretty new to C#, so I'm sure it's something easy...
Thanks much & Cheers,
Rich