nickfloyd / newrelic-perfmon-plugin

The Perfmon Plugin for the New Relic Plugins - https://newrelic.com/plugins
MIT License
11 stars 22 forks source link

WmiException when installing service multiple times #13

Closed DavidDeSloovere closed 3 years ago

DavidDeSloovere commented 10 years ago

If the service is already installed and the bat file is run again an exception is thrown. Might be better to catch this one and show a more friendly message.

C:\Users\admindeef>D:\perfmon_plugin_standalone\install_perfmon_plugin_service.b at WMI.WmiException: StatusServiceExists at WMI.WmiRoot.BaseHandler.CheckError(ManagementBaseObject result) at WMI.WmiRoot.ClassHandler.Invoke(Object proxy, MethodInfo method, Object[] args) at WMI.Win32ServicesProxy.Create(String , String , String , ServiceType , Err orControl , StartMode , Boolean , String[] ) at winsw.WrapperService.Run(String[] _args) at winsw.WrapperService.Main(String[] args)