c# - Creating a windows service from a windows forms application -


i have windows forms application, wonder how can modify windows service application. application windows forms configure parameters windows service.

example: have button set windows service parameters.

thanks,

rodrigo

you can start service setting startup parameters through form application using servicecontroller class available under namespace system.serviceprocess.

servicecontroller service = new servicecontroller(); string[] args=new string[2]; args[0] = "your first argument"; args[1] = "your second argument"; service.displayname = "your service display name";//as appears in services.msc service.start(args); 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -