Can software differentiate between a laptop and a desktop?
A license for CPU-intensive software like Pix4D says it can be installed on two devices - but with a condition. Reading the finer print, it seems that one device can be a full-processing workstation/desktop whereas the other must be a mobile device/laptop.
How would the software know? Are there giveaways in the hardware specifications for determining something like this e.g. presence of a battery?
Given the software is fully functional on both machines, wouldn't this condition become irrelevant if I just buy a high-end laptop which is just as fast as the workstation?
On Linux, you can run the following command:
sudo dmidecode --string chassis-type
On a laptop, this will return "Laptop", "Notebook" "Portable", or "Sub Notebook" (depending on the manufacturer).
For Windows, refer to the following documentation to determine your computer chassis type:
Identifying the Chassis Type of a Computer
To add to the other answer here re: Linux, Windows software can also access this information through various provided WinAPI methods/objects. One such example is Win32_ComputerSystem, which among others, has members such as:
PCSystemTypeEx
Data type: uint16 Access type: Read-only Type of the computer in use, such as laptop, desktop, or Tablet.
Possible values include:
Unspecified (0)
Desktop (1)
Mobile (2)
Workstation (3)
Enterprise Server (4)
SOHO Server (5)
Appliance PC (6)
Performance Server (7)
Slate (8)
Maximum (9)
As for how Windows knows this, while I can't say with certainty because I lack both the Windows source code and any official documentation links presently, I'd say its a simple matter of the hardware ID's within the computer giving this information away to the OS. Since Windows has a massive partner network that submit their drivers directly to Microsoft (for driver updates via Windows Update, "standard" drivers to include with install media), it's pretty easy for Windows to figure out precisely what kind of computer you've installed it on. Just by the CPU ID alone you could make a pretty safe bet whether the machine is a laptop or desktop.
There are various hints. One is the "system type" in the DMI data. Another is whether or not the system has a battery. Yet another is the type of processor, chipset, display controller, display etc. None of them are foolproof but by taking them together it would be pretty easy to write a classifier that grouped systems into "almost certainly a laptop", "almost certainly a desktop/workstation" and "undetermined".
But honestly enforcement of licensing through technical/activation methods tends to be focussed on preventing large scale abuse. Small scale abuse is more likely to be handled through audits, disgrunted employees ratting out their bosses etc.
Given the software is fully functional on both machines, wouldn't this condition become irrelevant if I just buy a high-end laptop which is just as fast as the workstation?
If you can buy a laptop that is as fast as your workstation you must have a pretty low end (or old) workstation.
The code that was used to write the software can determine what type of "Chassis" it is currently being run on.
See this answer for an example in C#. This can determine whether the computer is any of the following types (some are seemingly repeats, and/or outdated):
- Other
- Unknown
- Desktop
- LowProfileDesktop
- PizzaBox
- MiniTower
- Tower
- Portable
- Laptop
- Notebook
- Handheld
- DockingStation
- AllInOne
- SubNotebook
- SpaceSaving
- LunchBox
- MainSystemChassis
- ExpansionChassis
- SubChassis
- BusExpansionChassis
- PeripheralChassis
- StorageChassis
- RackMountChassis
- SealedCasePC
Also about my comment saying that they are seemingly repetitive - that was a matter of my opinion - just by looking over the list it appears to have been created ad hoc over the years and does not appear to be MECE. Indeed, I several instances of people saying that the need for differentiation between some of the above form factors is no longer relevant or understood (for instance see this short summary of the sub notebook.