Search code examples
cmdwindows-serviceslabview

How to run cmd through LabView that will stop or start a Windows service?


I need to start or stop a Windows servicy through LabVIEW. In order to do that, i need to run cmd as administrator. Actually I didn't know how to run cmd as an admin through LabVIEW so I created another cmd by way described here (OPTION TWO). After that I need to type "net start SERVICE_NAME" or "net stop SERVICE_NAME", but I dont know how to programmatically run one of those commands . How can I do that?

Thank you


Solution

  • I think you can use the following toolkit from Grovf.

    http://sine.ni.com/nips/cds/view/p/lang/en/nid/215588