Home All Groups Group Topic Archive Search About

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

Author
27 Oct 2006 4:24 PM
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.



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

Author
27 Oct 2006 4:29 PM
Theo Verweij
Look at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_systemenclosure.asp

Terry Olsen wrote:
Show quoteHide quote
> 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 ***
Author
28 Oct 2006 3:14 PM
Michel Posseth [MCP]
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]







Show quoteHide quote
"Terry Olsen" <tolse***@hotmail.com> schreef in bericht
news:uMBuURe%23GHA.4376@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 ***
Author
28 Oct 2006 3:40 PM
Cor Ligthert [MVP]
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

Show quoteHide quote
"Michel Posseth [MCP]" <M***@posseth.com> schreef in bericht
news:OEgSjOq%23GHA.1220@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" <tolse***@hotmail.com> schreef in bericht
> news:uMBuURe%23GHA.4376@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 ***
>
>
Author
28 Oct 2006 4:18 PM
Michel Posseth [MCP]
>> 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



Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> schreef in bericht
news:uG2Aicq%23GHA.2300@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]" <M***@posseth.com> schreef in bericht
> news:OEgSjOq%23GHA.1220@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" <tolse***@hotmail.com> schreef in bericht
>> news:uMBuURe%23GHA.4376@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 ***
>>
>>
>
>
Author
28 Oct 2006 4:23 PM
Terry Olsen
All of our pc's have UPS's attached. So that test wouldn't be valid as all
monitor battery status.


Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:uG2Aicq%23GHA.2300@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]" <M***@posseth.com> schreef in bericht
> news:OEgSjOq%23GHA.1220@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" <tolse***@hotmail.com> schreef in bericht
>> news:uMBuURe%23GHA.4376@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 ***
>>
>>
>
>
Author
28 Oct 2006 5:32 PM
Daniel
> 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...