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

  • Thread starter Thread starter Terry Olsen
  • Start date Start date
T

Terry Olsen

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.
 
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]
 
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 said:
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 said:
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.
 
Battery status ( WMI ) as a normall computer does not have a battery i
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 said:
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 said:
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 said:
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.
 
All of our pc's have UPS's attached. So that test wouldn't be valid as all
monitor battery status.


Cor Ligthert said:
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 said:
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 said:
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.
 
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
 
Back
Top