2 Replies Latest reply on Mar 8, 2017 2:24 PM by AdamOC

    How do I map software to a specific machine type without matching a hardware ID?

    Rookie

      Hi All,

       

      I know this was asked before on the forums, but the answer that was given was a little unclear and asked in 2015.

       

      I am trying to load utilities for an HP 650 G2 laptop. The utility is from HP and controls the Hotkey functionality. I want to be able to push this software to this laptop without matching it to a specific device ID. I know LANDesk has software mapping, but I believe this is not the tool that I am looking for. If there is anyone who can provide a clear direction on how to push packages to a specific model of machines, that would be appreciated.

       

       

      Thank you,

      Adam

        • 1. Re: How do I map software to a specific machine type without matching a hardware ID?
          jParnell Specialist

          You could easily accomplish this with a little VBS. Create a new vbs script and populate it with the following:

          Dim strComputer, bjWMIService, colMfg, objMfg

           

          strComputer = "."

          Set objWMIService = GetObject("winmgmts:" _

            & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

           

          Set colMfg = objWMIService.ExecQuery("Select * From Win32_ComputerSystem")

           

          For Each objMfg in colMfg

            If objMfg.Model = "650 G2" then '* The model in quotations must match a "wmic csproduct get name" command return in cmd on your target model

              Wscript.Echo "Model: " & objMfg.Model

              Wscript.Quit(1)

            Else

              Wscript.Echo "Model: " & objMfg.Model

              Wscript.Quit(0)

            End If

          Next

          Create a new conditional in your template (Add → Condition → If), the right click the condition and click Add Action. Change the type to Execute File, name it appropriately (Determine Model).

           

          Under "Target path and file name:", target cscript. Under parameters, target your VBS script. Under "Expected return value", select = and type in 1 (since that is what the VBS will return if it matches the model). Make sure "Capture command output" is selected.

          Right click the conditional statement again and select "Add Action", then select the action you want to take (Distribute software if the utilities are packaged, or execute file if not).

          You could actually add more lines and more return codes for different models, all using the same script. You'd have to add multiple conditional statements, since OSP doesn't support nested conditionals, but it's plausible.

          2 of 2 people found this helpful
          • 2. Re: How do I map software to a specific machine type without matching a hardware ID?
            Rookie

            Thank you very much for this detailed response! This is the type of content that should be posted within a LANDesk help article. I will be implementing this, thank you so much for writing this up!