When using the K1000 appliance for Patching, Software Distribution and other means of manipulating client machines, it is often important to know the chassis type of a target machine. Knowing that a machine is a portable system versus a desktop system means that you can handle deployments to those systems in different ways. Note that this chassis type data collection is automated in the K1000 5.1 and above release. Chassis Type is a field populated by the agent and is available for label selection among other ways of using it.
This FAQ will help you automatically detect and apply Labels to systems through use of the Scripting module and Custom Inventory fields.
Create the Labels
1. Make sure that you have created labels for Portables, Desktops and Servers. Make sure that there are no current filters or jobs associated with these labels; they will have Filters associated with them later.
Download the VBS file
2. Download the Visual Basic Script, “chassistype10.vbs”. It will be the core of the detection process.
Create the script
3. Navigate to the Scripting module on your K1000 appliance.
4. Add New Item using the Action menu.
5. Name the script “Chassis Detection” or the like and optionally give it a description.
6. Under the Dependencies section, add the chassistype10.vbs file as a dependency.
7. Add a new Task Section
8. In the On Success section add a “Launch a program...” step
- Directory: $(KBOX_SYS_DIR)
- File: cscript.exe
- Wait for startup: checked
- Parameters: "$(KACE_DEPENDENCY_DIR)\chassistype10.vbs"
9. Save the script.
Set up the Custom Inventory Rule
10. Navigate to the Inventory module on your K1000 Appliance.
11. Enter the Software tab
12. Add New Item using the Action menu
13. Give the new Software item a name and optionally a vendor and version.
14. Select the appropriate Supported Operating Systems (All your Windows versions)
15. In the Custom Inventory Rule field enter:
RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\kace, ChassisType, TEXT)
16. Save the new software item.
Set up the Filters for your labels
17. Enter the Computers tab
18. Click on the Create Filter sub tab under the search field.
19. From the first criteria Drop-down menu, select the name of the Custom Field you created in previous section (e.g, Chassis Type).
20. Choose the values for Portable, Laptop, Notebook, & Sub-Notebook as OR operations
21. Associate the Label for portables with these criteria.
22. Click Create Filter.
23. Set up a Filter to apply the Server label based on “OS Name”-contains-“Server”
24. Set up the Filter for your Desktop machines by excluding machines with the Server label or the Portable label.
At this point you are done. All that’s left is to run the Script against some or all of your machines and the Custom Data section of each machine’s Inventory will be populated with the type of chassis that the machine has. Then, the next time a machine checks in, the Custom Inventory rule will be read and the appropriate Label will be applied.
attached files: chassistype10.vbs