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 6565141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:03:24+00:00 2026-05-25T14:03:24+00:00

I have an windows application (WPF) in which we are running on each login,

  • 0

I have an windows application (WPF) in which we are running on each login, however when the user first logs into a new PC the application will need to do some specific tasks, but only on the users first login and never on subsequent times.

Is there a way in .Net 3.5 to query wether the user has logged in before (ie some kind of login count)?

Failing any native support I will create a txt file in the users registry however I wanted to know if there is a native way of achieving this first.

We use redirected folders so the user may have already logged into a PC on our network these special events should only occur when the user hasnt logged in onto the PC and Windows has had to create a new profile for the user on the PC.

If I am not clearly explaining what I am seeking, please dont hesiate in letting me know.

Matt

  • 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-25T14:03:25+00:00Added an answer on May 25, 2026 at 2:03 pm

    Failing any native support I will create a txt file in the users registry however I wanted to know if there is a native way of achieving this first.

    I’d recommend going with this option. Don’t try to detect it, just create your own state on first run.

    I suggest this, not because it is technically impossible to achieve the functionality you describe, but because it is a better user experience. It provides an easy way to re-do the action without having to recreate the user.

    … a txt file in the users registry …

    I’m not sure what this means. You can create text files under the user’s profile directory, and you can insert string values in the registry (but not files of any sort).

    As for the particular mechanism, I suggest you consider:

    • An App.Config value. Clearing out the value is easier to support or batch-script than a registry value, and makes the user less scared that their machine will explode if you have to tell them to edit the settings. Users are scared of the registry.
    • A sentinel text file under the user profile directory. Wiping out the file is super-easy to support and batch-script. Instead of editing a text file, they can just delete one. But this makes it so you have multiple config mechanisms, so multiple points of failure. I’d only do this if I were using the App.Config for additional settings in the program and thought the user wouldn’t be technical enough to hand edit it.
    • The windows registry. Remote registry access might be easier than remote file access, if you’re having to do remote troubleshooting. It also might be easier to mess with via group policy, in case this is an intranet app and you need to force a re-run on all machines in your org.

    I’d carefully consider my options and which is most likely to ease support (be understandable by my users) before committing to one. I’d also consider the remote-troubleshooting/remote reset scenario.

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

Sidebar

Related Questions

I have a WPF application that will always run on windows 7, it opens
I am running a WPF 4.0 application which is published on Citrix. We have
In a WPF application, I have buttons which pop up instances of windows. I
I have an windows application written in WPF and WF which also interacts with
I'm looking to build a lob application, which will have to run on Windows
I have an WPF application which access windows services, task schedulers on the local
I have a fairly small solution that includes a WPF windows application. It builds
I have a WPF application with several windows. I would like to define GLOBAL
I have window form in my WPF Application when I open new window from
I have a windows application running at the backend. I have functions in this

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.