Click here to Skip to main content
15,890,506 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello,

i have a question regarding auto-start an application:

I have a C# WPF Application, packaged as an MSIX installation.
And i successfully setup a StartUp Task via entry in the Manifest.
That works fine - after user logs in, the app is started automatically.

But as an additional feature we would need to be able to auto-run the app BEFORE user logs in.
After Windows startup, before user login.

Is there a way to do so?
I didn't find a solution until now...

Thank you for help!

Best regards
Emanuel

What I have tried:

Creating a scheduled task for example i found to be not possible, because i can only run a regular .exe file, but no installed application.
Posted
Updated 24-Apr-22 5:08am
Comments
Richard MacCutchan 20-Apr-22 5:35am    
User applications can only run once the user is logged in. If you want something started before login then you need to create a Windows Service.
Emil12345687 20-Apr-22 6:16am    
Thank you, Richard! Okay, that sounds plausible. Could it be possible to intergrate the windows service project in my solution, or do i probably need a separately project/solution ?
The windows service should do a part of the windows application, so integrating would make possible that i could use the existing code parts/methods... But maybe it's basically better to separate the app completely from the windows service? Sorry, i have no experience creating a windows service...
Richard MacCutchan 20-Apr-22 6:26am    
That is impossible to answer without full details of your application. However, this is the Quick Answers forum, so you need to study the details of Windows services at the MSDN website.

1 solution

You can only run UI apps after login.

One possible solution is to make the applicable part of the app a windows service, so it will run without a user being logged in, and put the UI portion in the task bar, so the user can click on it to see the UI.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900