K2000 Post Install to determine Desktop or Laptop
I am trying to figure out how to create a post install task that would determine if a laptop or a desktop is being imaged. Then if its a desktop it would run these tasks and if its a laptop it would run these tasks.
What I am hoping for is something that wouldn't necessarily have to be updated constantly. I've thought about creating a batch file but then worry it may get too messy. Another reason is I want to make this as simple as possible so I can hand this over to a new person that may not have batch file experience.
An example: If computer is determined to be a laptop it would install VPN, Wifi connections, power settings, etc. If a desktop it would install different power settings, other software, etc.
Looking for as many ideas that you all have. If you are willing to provide screen shots or steps I would really appreciate it. Thanks
Answers (1)
You can simply use WMIC to collect this info.
wmic systemenclosure get ChassisTypes
The possible results are (taken from here: https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-systemenclosure )
Other (1)
Unknown (2)
Desktop (3)
Low Profile Desktop (4)
Pizza Box (5)
Mini Tower (6)
Tower (7)
Portable (8)
Laptop (9)
Notebook (10)
Hand Held (11)
Docking Station (12)
All in One (13)
Sub Notebook (14)
Space-Saving (15)
Lunch Box (16)
Main System Chassis (17)
Expansion Chassis (18)
SubChassis (19)
Bus Expansion Chassis (20)
Peripheral Chassis (21)
Storage Chassis (22)
Rack Mount Chassis (23)
Sealed-Case PC (24)
I would not do this via SDA but in the SMA:
1. create a CIR with that info:
2. create a Label for the needs you have.
As an example:
This will fill the label after the check in.
With the SDA you need to run a script, which checks for the result and run additional scripts from there which would be more programming logic. You can add the query on every post install for that if you like but I would do this via SMA because it is easier to maintain.
Comments:
-
However, I can see someone wanting to use this on the SDA to distribute something to the device, based on the query during a mid-level task. If desktop you get x, if laptop/notebook you get y. - cserrins 3 years ago