C# Application (MSIX installation): Startup Task before User Login?

%3CLINGO-SUB%20id%3D%22lingo-sub-3289984%22%20slang%3D%22de-DE%22%3EC%23%20Application%20(MSIX%20installation)%3A%20Startup%20Task%20before%20User%20Login%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3289984%22%20slang%3D%22de-DE%22%3E%3CP%3EHello%3C%2FP%3E%3CP%3Ei%20have%20a%20question%20regarding%20auto-start%20an%20application%3A%3C%2FP%3E%3CP%3EI%20have%20a%20C%23%20WPF%20Application%2C%20packaged%20as%20an%20MSIX%20installation.%3CBR%20%2F%3EAnd%20i%20successfully%20setup%20a%20StartUp%20Task%20via%20entry%20in%20the%20Manifest.%3CBR%20%2F%3EThat%20works%20fine%20-%20after%20user%20logs%20in%2C%20the%20app%20is%20started%20automatically.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20as%20an%20additional%20feature%20we%20would%20need%20to%20be%20able%20to%20auto-run%20the%20app%20BEFORE%20user%20logs%20in.%3CBR%20%2F%3EAfter%20Windows%20startup%2C%20before%20user%20login.%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20do%20so%3F%3CBR%20%2F%3EI%20didn't%20find%20a%20solution%20until%20now...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECreating%20a%20scheduled%20task%20for%20example%20i%20found%20to%20be%20not%20possible%2C%20because%20i%20can%20only%20run%20a%20regular%20.exe%20file%2C%20but%20no%20installed%20application.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20help!%3C%2FP%3E%3CP%3EBest%20regardsEmanuel%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3301843%22%20slang%3D%22en-US%22%3ERe%3A%20C%23%20Application%20(MSIX%20installation)%3A%20Startup%20Task%20before%20User%20Login%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3301843%22%20slang%3D%22en-US%22%3EMSIX%20apps%20require%20the%20user%20to%20be%20logged%20in.%20However...%3CBR%20%2F%3E%3CBR%20%2F%3EMSIX%20apps%20may%20contain%20windows%20services.%20These%20services%20are%20deployed%20at%20the%20system%20level%2C%20and%20may%20be%20set%20to%20AutoStart%20(before%20the%20user%20logs%20in).%20So%20if%20you%20can%20code%20it%20as%20a%20service%2C%20you%20might%20get%20it%20to%20work.%3CBR%20%2F%3E%3CBR%20%2F%3EBut%20what%20is%20it%20that%20you%20really%20want%20this%20startup%20task%20to%20do%3F%3C%2FLINGO-BODY%3E
Occasional Visitor

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...

 

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.

 

Thank you for help!

Best regards
Emanuel

1 Reply
MSIX apps require the user to be logged in. However...

MSIX apps may contain windows services. These services are deployed at the system level, and may be set to AutoStart (before the user logs in). So if you can code it as a service, you might get it to work.

But what is it that you really want this startup task to do?