Archive: Check if it is a Notebook


Check if it is a Notebook
Hi,
I want to check if the the installation is in on a laptop or not. Could somebody say me how I can check it?
Thanks,
mamilo


You could call GetPwrCapabilities using the System plug-in and check the SystemBatteriesPresent member of the SYSTEM_POWER_CAPABILITIES struct. I'd say batteries on a computer are a pretty good indicator to a laptop.


Originally posted by kichik
I'd say batteries on a computer are a pretty good indicator to a laptop.
Under normal circumstances I would agree but for example my desktop pc is connected to an APC Back-UPS (Uninterruptible Power Supply), which is being recognized as "system battery" by windows due to the USB connection it comes with. ;)

you may try to check for the CPU's power saving capabilities or simply it's id.
there are indicators for mobile chipsets.

you also could try for the same with grafik chipset.

or with mainboard chipset :)

try to find out if there's a central indicator for notebook hardware.


Originally posted by Comm@nder21
try to find out if there's a central indicator for notebook hardware.
Hard to do I guess unless there isn't some special point. e.g. the power saving capabilities are also available on some entertainment pc's which use laptop processors.

Originally posted by Theresias
Under normal circumstances I would agree but for example my desktop pc is connected to an APC Back-UPS (Uninterruptible Power Supply), which is being recognized as "system battery" by windows due to the USB connection it comes with. ;)
That's weird... It should set UpsPresent to TRUE, not declare it as a battery. In that case, BatteriesAreShortTerm can be added to the test as UPS is usually short term. I guess a serious UPS with long term capabilities, like one running on fuel won't have a USB connection :)

then, give me a hint:

what does your installer do with the users system, that it cant or shouldnt do with a system, that works somekind similar to a notebook but is not really one? (pc with ups, mediacenter pc with mobile cpu, ...)

which functionality are you really looking for?