473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to tell if my app is running on laptop or desktop?

Is there a way through WMI or another method that I can tell if my app
is running on a laptop or desktop? The
Win32_ComputerSystem::PcSystemType property is not available on anything
below Vista.

*** Sent via Developersdex http://www.developersdex.com ***
Oct 27 '06 #1
6 4142
Look at
http://msdn.microsoft.com/library/de...menclosure.asp

Terry Olsen wrote:
Is there a way through WMI or another method that I can tell if my app
is running on a laptop or desktop? The
Win32_ComputerSystem::PcSystemType property is not available on anything
below Vista.

*** Sent via Developersdex http://www.developersdex.com ***
Oct 27 '06 #2
Hi

Well i seem to remember that ther is a class that can determine the Battery
status ( WMI ) as a normall computer does not have a battery i guess thi
sis the way to go

Regards

Michel Posseth [MCP]



"Terry Olsen" <to******@hotmail.comschreef in bericht
news:uM****************@TK2MSFTNGP03.phx.gbl...
Is there a way through WMI or another method that I can tell if my app
is running on a laptop or desktop? The
Win32_ComputerSystem::PcSystemType property is not available on anything
below Vista.

*** Sent via Developersdex http://www.developersdex.com ***

Oct 28 '06 #3
Michel,

I would have written this a little bit else, not about the English but about
the content. Every modern computer has a battery to let things as the date
and other system information alive. But that one is not showed up in wmi.

Not every modern computer has a battery as a power supplier, so your
solution is probably right.

Cor

"Michel Posseth [MCP]" <MS**@posseth.comschreef in bericht
news:OE****************@TK2MSFTNGP05.phx.gbl...
Hi

Well i seem to remember that ther is a class that can determine the
Battery status ( WMI ) as a normall computer does not have a battery i
guess thi sis the way to go

Regards

Michel Posseth [MCP]



"Terry Olsen" <to******@hotmail.comschreef in bericht
news:uM****************@TK2MSFTNGP03.phx.gbl...
>Is there a way through WMI or another method that I can tell if my app
is running on a laptop or desktop? The
Win32_ComputerSystem::PcSystemType property is not available on anything
below Vista.

*** Sent via Developersdex http://www.developersdex.com ***


Oct 28 '06 #4
>Battery status ( WMI ) as a normall computer does not have a battery i
>guess thi sis the way to go
Every modern computer has a battery to let things as the date and other
system information alive. But that one is not showed up in wmi.
Okay you got me there , but you understand the idea :-)

for the TS ,, a quick google brought this up

http://www.thescripts.com/forum/thread368362.html

"Cor Ligthert [MVP]" <no************@planet.nlschreef in bericht
news:uG****************@TK2MSFTNGP04.phx.gbl...
Michel,

I would have written this a little bit else, not about the English but
about the content. Every modern computer has a battery to let things as
the date and other system information alive. But that one is not showed up
in wmi.

Not every modern computer has a battery as a power supplier, so your
solution is probably right.

Cor

"Michel Posseth [MCP]" <MS**@posseth.comschreef in bericht
news:OE****************@TK2MSFTNGP05.phx.gbl...
>Hi

Well i seem to remember that ther is a class that can determine the
Battery status ( WMI ) as a normall computer does not have a battery i
guess thi sis the way to go

Regards

Michel Posseth [MCP]



"Terry Olsen" <to******@hotmail.comschreef in bericht
news:uM****************@TK2MSFTNGP03.phx.gbl...
>>Is there a way through WMI or another method that I can tell if my app
is running on a laptop or desktop? The
Win32_ComputerSystem::PcSystemType property is not available on anything
below Vista.

*** Sent via Developersdex http://www.developersdex.com ***



Oct 28 '06 #5
All of our pc's have UPS's attached. So that test wouldn't be valid as all
monitor battery status.
"Cor Ligthert [MVP]" <no************@planet.nlwrote in message
news:uG****************@TK2MSFTNGP04.phx.gbl...
Michel,

I would have written this a little bit else, not about the English but
about the content. Every modern computer has a battery to let things as
the date and other system information alive. But that one is not showed up
in wmi.

Not every modern computer has a battery as a power supplier, so your
solution is probably right.

Cor

"Michel Posseth [MCP]" <MS**@posseth.comschreef in bericht
news:OE****************@TK2MSFTNGP05.phx.gbl...
>Hi

Well i seem to remember that ther is a class that can determine the
Battery status ( WMI ) as a normall computer does not have a battery i
guess thi sis the way to go

Regards

Michel Posseth [MCP]



"Terry Olsen" <to******@hotmail.comschreef in bericht
news:uM****************@TK2MSFTNGP03.phx.gbl...
>>Is there a way through WMI or another method that I can tell if my app
is running on a laptop or desktop? The
Win32_ComputerSystem::PcSystemType property is not available on anything
below Vista.

*** Sent via Developersdex http://www.developersdex.com ***



Oct 28 '06 #6
All of our pc's have UPS's attached. So that test wouldn't be valid as
all monitor battery status.
UPS does not appear as an internal battery anywhere. It would show up as
a device connected to a com port or usb, but *only* if you had the direct
cable connection.

Daniel
---------------------------------------------------
To contact me you need to clean up my email address. It should be fairly
obvious...
Oct 28 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Plumer | last post by:
Good morning everyone, I am having difficulty distributing a Release version of an application. System info C# DOTNET, MDE 2002, Version 7.0.9466 .Net Framework, version 1.0.3705 My...
0
by: Rob R. Ainscough | last post by:
I have two computers running the exact same application against the exact same database (in this case a local MS Access database). One PC is a dual Xeon 3.06Ghz 1MB cache with 2GB of memory and...
2
by: | last post by:
I was wondering if the seasoned pros on the asp and db forums including (Bob, Ray, Aaron, Curt and others) would mind offering advice on ideal laptop requrements for web development requirements. ...
0
by: Uttam | last post by:
Hello, I created and worked on my application on my desktop and copied it to my laptop. After putting in many additions to the functionality on the Laptop version, I copied it back to my...
7
by: Michael C | last post by:
Hi all, Just started having a problem with the IDE. When I try to 'start' code in the IDE the IDE locks up. It builds and re-builds OK, and I can run the generated EXE outside the IDE, but...
0
by: =?Utf-8?B?Q2hyaXN0aW5h?= | last post by:
Whoever can figure this problem out will be a genius. I have a home network that includes: 2 desktop computers both running on Windows XP and 1 laptop running Windows Vista. The desktop computers...
3
by: mazdotnet | last post by:
Hi guys, I'm thinking of buying a laptop time this time and I was wondering if anyone has any experience with running VisualStudio 2008 and MSSQL 2005 on a laptop? Please include your processor,...
12
by: Jonathan Wood | last post by:
Greetings, I wonder if anyone can help me with this. I have an XP laptop, and a Vista desktop computer. I use the laptop to run software remotely on the desktop using the Remote Desktop...
5
by: Christopher Brewster | last post by:
I am running the same script on the same data on two different machines (the folder is synchronised with Dropbox). I get two different results. All the script does is count words in different...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.