Pergunta

I have a WPF application that I would like to be launched anytime the computer starts NOT when a user logs in. I know I can place the .exe in the startup folder, but I don't want that since a user has to login for that to be launched. I cannot use a Windows service, it's not an option for me.

Is there a way to start up an application once the PC starts up(or reboots), even before a user logs in? Any help is much appreciated.

Foi útil?

Solução 2

How about using the Task Scheduler? In Windows 7, there's a "Security options" section where you can set an option for a task to run whether a user is logged on or not. You can specify an executable file, and it'll start when Windows starts up.

(This won't scale though, if you're looking for an option when a user installs your software. For that, a service is the correct way to go... you may need to elaborate in your question why exactly you can't use a service.)

enter image description here

enter image description here

Outras dicas

You can't run an application without a user login. The only thing you can run is a Service, which I'm guessing from your question being about WPF that this is not what you want.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top