Is there a bug with the ServiceController class? If I use the following code to connect to a Windows NT 4.0 workstation I get an error:
//************************************************************************** ***************************** private void PIAServiceStatus_Load(object sender, System.EventArgs e) { this.Text = "Current Service Status : " + gCurrentMachine; ServiceController PIAsrv = new ServiceController("PontisInstallAgent", gCurrentMachine); label1.Text = PIAsrv.Status.ToString(); } //************************************************************************** ***************************** The following error is returned: **************************************************************************** *************************** An unhandled exception of type 'System.InvalidOperationException' occurred in system.serviceprocess.dll Additional information: Service PontisInstallAgent was not found on computer 'iblonerw1020'. **************************************************************************** *************************** The code works fine communicating to Windows XP & Windows 2000. According to the SDK Windows NT 4.0 is supported. Most of our machines are running sp4 or sp6 and there are about 5000 of them. Simon ---------------------------------------------------------------------- If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. ---------------------------------------------------------------------- You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.