Can software differentiate between a laptop and a desktop?

42

9

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?

Islay

Posted 2016-02-04T22:57:10.533

Reputation: 521

In Devices and Printers, you can see a device that represents your PC. If it's a laptop, it will show a laptop icon. Not sure if other software can or will use this info, though. – ecube – 2016-02-04T23:52:21.047

17The presence of a battery is probably a good one, but I'm sure some UPSes would also count as batteries. – user253751 – 2016-02-05T08:58:38.090

2I think Pix4D does not check what type of hardware is used. It just gives out two different licenses. In one of the license only "Rapid Check processing mode" is allowed whereas the other is a full license. – user797717 – 2016-02-05T09:58:53.040

1The software may be able to glean that info from the OS - if not, I'd suggest that the presence of a lid button (i.e the laptop sensing when the lid is closed) is probably a dead giveaway for laptops. of course this doesn't cover all, as you do get phablets / all-in-ones and others. – jammypeach – 2016-02-05T11:24:22.907

Are you sure that software even cares the hardware type? "One device for on-site Rapid Check and one device for Full Processing mode." sounds like you can install a crippled version of the software on the second device. – CodesInChaos – 2016-02-05T14:53:04.930

Run wmic computersystem get "description,manufacturer,model,name,PCSystemType" – Ben – 2016-02-05T16:19:53.757

2Does the software even attempt to enforce it? Or is it just honor system? – whatsisname – 2016-02-05T21:29:15.477

Motherboard type is probably the simplest and most fundamental way to differentiate between a laptop and desktop. – Chris Johns – 2016-02-06T00:39:18.447

I guess that, the same way it can know whether a wireless keyboard is a toaster, it can know whether the PC is a laptop or a desktop.

– Oriol – 2016-02-06T03:45:13.950

@Ben apparently my computer has ERROR: Description = Invalid query type. – Ejaz – 2016-02-07T14:45:09.710

It can probably differentiate on processor type too. And then combine all of the other (built-in wifi, battery, motherboard type, lid switch, trackpad, hints from OS) readings to make an educated guess – Ejaz – 2016-02-07T14:46:30.857

Run wmic computersystem get description,manufacturer,model,name,PCSystemType without double-quotes. Really, I think the manufacturer just stores it somewhere, bios maybe. – Ben – 2016-02-08T09:51:06.350

Yes, it's put into the bios by the manufacturer: "Dmidecode reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard" http://www.nongnu.org/dmidecode/

– Ben – 2016-02-08T09:53:01.707

@whatsisname: That seems to be the right question. Their article on 'floating license' has the following: "The license has no limitations in both machines. All features, tools, processing steps can be used by both machines." I presume it is in fact an honour system then [quite strong an integrity expected of users given the price of each license]. – Islay – 2016-02-11T21:45:57.787

@CodesInChaos: I would've thought the same, but the above suggests otherwise. – Islay – 2016-02-11T21:46:10.337

Their article on a 'floating license' is here.

– Islay – 2016-02-11T21:55:48.840

Answers

54

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

abnev

Posted 2016-02-04T22:57:10.533

Reputation: 706

21

Heh, that pizza box really confused me until I read this https://en.wikipedia.org/wiki/Pizza_box_form_factor

– ecube – 2016-02-04T23:25:35.347

I had a laptop that identified itself as such once. It was a piece of junk ;p – Journeyman Geek – 2016-02-04T23:47:21.747

5Both my desktop and my laptop systems identify themselves as 'Other'. I do expect many would correctly identify themselves, mind you. – ChrisInEdmonton – 2016-02-05T16:25:42.543

@dma1324 Wow, 117 mips for under $100k! – Michael – 2016-02-05T18:10:14.263

3My Chromebook identified itself as a desktop. – dramzy – 2016-02-05T18:43:47.113

Remind me to try this out once I root my phone – John Dvorak – 2016-02-06T11:58:13.403

@dramzy Well if you want to be PC you should treat it as a desktop. – Dason – 2016-02-06T22:18:56.937

This is of limited value. For example, my 3U rackmount fileserver identifies itself as a "Desktop" because I used a desktop-class mainboard when assembling it. – Mark – 2016-02-07T06:29:56.603

13

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.

user72945

Posted 2016-02-04T22:57:10.533

Reputation:

Yeah but how does Windows know – Lightness Races with Monica – 2016-02-05T10:40:32.523

3@PreferenceBean Windows kernel asks windows server about hardware ids and windows server asks linux? ;) – None – 2016-02-05T11:48:05.097

2In the answer please – Lightness Races with Monica – 2016-02-05T11:51:07.470

More likely the manufacturer puts it in the registry via the driver installation process. – Ben – 2016-02-05T16:21:56.410

6The CPUID is strongly suggestive; but not foolproof. Small form factor desktops sometimes use mobile CPUs, and there have been a few ultra high end gaming "laptops" that were built using desktop CPUs. – Dan is Fiddling by Firelight – 2016-02-05T16:43:59.140

@Ben but what about drivers that are unknown to Windows until to talks to the Windows update process? There's gotta be a remote repository of hardware uids. Probably a blend of both local as you suggest and remote. – None – 2016-02-05T23:32:48.467

1

"Dmidecode reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard" http://www.nongnu.org/dmidecode/ Almost certainly WMI gets the information from the same place. That's what standards are for after all.

– Ben – 2016-02-08T09:55:08.727

There's no APIs in windows to retrieve this "guessing", only WMI. – SomeNickName – 2016-02-10T19:16:28.047

3

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.

plugwash

Posted 2016-02-04T22:57:10.533

Reputation: 4 587

2

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.

William

Posted 2016-02-04T22:57:10.533

Reputation: 413

https://technet.microsoft.com/en-us/library/ee156537.aspx For the values when querying WMI. There isn't solid consensus on where the delineation is between "workstation" and "mobile device", but the vendor should be able to state what criteria they use. – blaughw – 2016-02-05T21:12:56.287

3Which ones are "easter eggs"? All of those look like actual chassis types to me. – Cody Gray – 2016-02-06T10:34:45.780

1Microsoft has a policy of absolutely no easter eggs allowed, so it might be surprising to you, but none of them are easter eggs. – Derek 朕會功夫 – 2016-02-07T06:23:42.903

Even a PizzaBox or LunchBox? – William – 2016-02-08T15:32:24.367

I just wikipediaed it and you are correct! Those are real chassis types lol - i will update my answer – William – 2016-02-08T15:32:55.557