G
Girish Hegde
Hi,
I am trying to publish a windows form using WMI. It throws
an exception. But the same code works for a class not
derived from Form. Here is the code. Thanks for your help
Regards
Girish Hegde
[System.Management.Instrumentation.InstrumentationClass
(System.Management.Instrumentation.InstrumentationType.Inst
ance)]
public class Form1 : System.Windows.Forms.Form
{
private System.ComponentModel.Container components =
null;
public Form1()
{
InitializeComponent();
System.Management.Instrumentation.Instrumentation.Publish
(this);
}
}
AssemblyInfo.cs
// Specify which namespace the data should be published
into
[assembly:System.Management.Instrumentation.Instrumented
("root/WindowsApplication3")]
[System.ComponentModel.RunInstaller(true)]
public class WindowsApplication3CustomInstaller:
System.Management.Instrumentation.DefaultManagementProjectI
nstaller
{
}
I am trying to publish a windows form using WMI. It throws
an exception. But the same code works for a class not
derived from Form. Here is the code. Thanks for your help
Regards
Girish Hegde
[System.Management.Instrumentation.InstrumentationClass
(System.Management.Instrumentation.InstrumentationType.Inst
ance)]
public class Form1 : System.Windows.Forms.Form
{
private System.ComponentModel.Container components =
null;
public Form1()
{
InitializeComponent();
System.Management.Instrumentation.Instrumentation.Publish
(this);
}
}
AssemblyInfo.cs
// Specify which namespace the data should be published
into
[assembly:System.Management.Instrumentation.Instrumented
("root/WindowsApplication3")]
[System.ComponentModel.RunInstaller(true)]
public class WindowsApplication3CustomInstaller:
System.Management.Instrumentation.DefaultManagementProjectI
nstaller
{
}