c# - How to get status of remote windows service -


i'm trying status of remote windows service. use code this, nothing happens. labels have not value. please!

connectionoptions options = new connectionoptions(); options.password = "password"; options.username = "username"; options.impersonation = system.management.impersonationlevel.impersonate;  managementscope scope = new managementscope("\\\\computer_name\\root\\cimv2", options); scope.connect();  servicecontroller sc = new servicecontroller("service_name", "computer_name"); label1.text = sc.servicename; label2.text = sc.status.tostring(); 


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -