Create service that starts a program during Windows startup in C # WPF
1 answer
Clarification: WPF is a UI tool, not implemented through a service. It is not supported in this usage. You just have to use the key Run
on windows: http://www.windowsdevcenter.com/pub/a/oreilly/windows/ron/startup_0401.html
If you really need a service: Visual Studio has a Windows Service template; New Project => Templates => Visual C # => Windows Desktop => Windows Service. Use it.
Note: you will also need to install the service, and make sure the startup mode is set to "automatic"; there are three ways to do this:
- installer project
-
installutil
- or you can do exe self-tuning / un -install, referring to the project from within the assembly and installation causing the installation of the code (I'm trying to use
my.exe -i
andmy.exe -u
to install / uninstall)
+2
source to share