Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6153689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:08:03+00:00 2026-05-23T20:08:03+00:00

I would like to run WPF application before logging in to Windows. It shouldn’t

  • 0

I would like to run WPF application before logging in to Windows. It shouldn’t do any of existing UI just call ApplicationStartup event – it would trigger the functions I need.

Currently I’m using a windows service in conjunction with app, so service runs before logging in.

The downside now is that my app doesn’t know what the service is doing without polling it.

And this is a requirement as machines can crash and restart itself, but Windows should still be running application anyway after boot up.

Is there any way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:08:04+00:00Added an answer on May 23, 2026 at 8:08 pm

    No, this is not possible. WPF applications are user-mode applications, so they must be run within the context of a logged-in user. Since Windows is a multi-user operating system, it is possible for the OS to be running, but no users to be logged in. In those situations, there is no place for your application to run.

    Windows services are the only thing that can do this, and that’s precisely because they do not run under a particular user context. In fact, this same feature is often a source of frustration for developers who want to create a Windows service that interacts with the user. That’s not possible (at least not as of Windows Vista, which patched all the security holes present in prior versions).

    Alternative solutions:

    • Add your application to the default user’s "Startup" folder, which will force it to launch each time that a user logs in to the machine.

      In this scenario, the only time it will not be running is when no users are logged in, in which case it’s sort of hard to imagine that your app/service is actually doing anyone any good.

    • Configure each machine to automatically log in as a particular user whenever Windows starts up. Combining this with the above, you work around the fact that the computer could ever be left without a user logged in, even immediately after a crash/restart.

    Although the pattern of having a separate user-mode application (WPF, WinForms, or whatever) that can show a UI control the Windows service running in the background is quite a common one. I’m not sure what you think is wrong with that setup. There’s nothing wrong with polling the service when necessary for information. Services by definition do not require user intervention. Separating the part that requires user intervention out into a separate app is not only the typical practice, but necessary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to display a WPF window from a windows forms application (.NET
I would like to run some code onload of a form in WPF. Is
I would like to run multiple copies of my application and force the first
I would like to run a task if any file in an item list
I have a WPF application , and I would like to modify the background
I have a working WPF application. I would like to see it running as
I would like to run a job through cron that will be executed every
I would like to run the following SQL select: SELECT ID, NUMERATOR, (SELECT m.COLUMNNAME
I would like to run APIDemos under platforms\android-1.5\samples directory on Android emulator but I
I would like to run a (extensive) query that produces one line of XML.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.