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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:06:45+00:00 2026-05-14T21:06:45+00:00

I need a way for my .Net Winform app to detect if my app

  • 0

I need a way for my .Net Winform app to detect if my app is opened on a Laptop or a Workstation.

I have looked at Environment and SystemInformation but to no avail. Would WMI do the trick?

Thanks for the direction….


As requested I have an application that uses Merge Replication to allow our users to work in Members homes. Some who use the program never go in the field and as such only have towers. This is a WORK only app so our systems are somewhat controlled. As in, no UPS on Desktops and No Laptop CPU either.

I have setup my DAL to be able to switch, based an a setting, between local SQL and the Central SQL Server. I would like to be able to set this automatically based on there system.

If a laptop then they should be pointing local if a tower, centrally.

Does this help? I deliberately left it off before to don’t clutter the answers. My apologies for apologies for accomplishing the opposite.

  • 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-14T21:06:46+00:00Added an answer on May 14, 2026 at 9:06 pm

    This is a really hard problem to solve because of the edge cases involved. I don’tk now how accurate you need to be for your application, but here is a reliable way to find out if the user is on a sterotypical laptop.

    Win32_Battery

    You might want to take a look at EstimatedRunTime.

    EstimatedRunTime

    Data type: uint32
    Access type: Read-only
    
    Estimate in minutes of the time to battery charge depletion under the
    

    present load conditions if the utility
    power is off, or lost and remains off,
    or a laptop is disconnected from a
    power source. This property is
    inherited from CIM_Battery.

    You also might want to check:

    Win32_PortableBattery

    Also, here’s an interesting discussion of a similar problem and dealing with UPS.

    http://forum.bigfix.com/viewtopic.php?pid=19908

    Specifically:

    "Microsoft ACPI-Compliant Control Method Battery"
    

    Also, as noted in the comments, you will have to consider users on a laptop plugged into the wall with the battery disconnected.

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

Sidebar

Related Questions

I have a groupox in a VB.NET winform app. The groupbox contains a few
I have a WinForm App(.Net 3.5) that we use in house for data entry...ish,
I have a web page that is being displaying in a winform app using
I have a C# .NET 2.0 WinForms app. My app has a control that
I am trying to migrate a simple WinForms app to a ASP.Net web app.
Background: Professional tools developer. SQL/DB amateur. Setup: .Net 3.5 winforms app talking to MS
Does anyone have any opinions over the best ways to connect a client to
How feasible is it( and some guidance ) to build a WPF ( Silverlight
Got some C# forms/controls that can be called up either from a C# control

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.