Can it be done? Install apps based on laptop/desktop



  • I am using Groups as OU’s and snappins for apps I want to install.

    We have 3 applications that we only install on laptops and the way this was originally done through MDT was a Task sequence variable set to IsLaptop = True

    Anyone knows if this is also a possibility with Fog, I wouldn’t want to segment my groups more as those are mostly used for OU’s…

    But still I’m listening, what are your suggestions?


  • Testers

    @FlowLive I guess the only question I am seeing is that you are asking how to determine if the machine is a laptop or desktop. The easiest way to accomplish this is to use a script as the snap in that will check if it is a laptop and if so run the installer from a share some where. If it is a desktop then no installer is run.

    Natively there is no way to have FOG determine if the machine is a laptop. But if you know what machines are laptops as you add them, you can have machines belong to multiple groups, add all laptops to a Laptop group and apply only those 3 snapins with no other setting in that particular group. Not automatic, but does work.

    I quite often use scripts instead of actual files for snap ins, mostly due to old limitations of snapins back in the .32 days, so I guess it is just an old habit.



  • @ITSolutions

    Precisely yes because of tablets and Surface Pro for example…

    I appreciate everyones help on the matter, anyone has answer to my other requests or could confirm the behavior of the groups snappins?


  • Testers

    @Wayne-Workman You want to be careful using wireless as a determination for laptops. All of our new desktops have wireless built in also. They are the micro PC’s from Dell, the 3020M’s.


  • Moderator

    @Wayne-Workman said:

    You can script this. Just write a batch file to detect if there is a “Wireless Network Connection 1” or not… There are other ways too, like detecting if there is a battery percentage or not, if there is a lid-close setting available or not. Once you have these checks in a script and working, you can just push your snapin to all systems.

    @FlowLive Hi, you can use DMI information to get chassis type.

    On a linux (in my case it’s a VM on an ESXi) :

    # dmidecode --string chassis-type
    Other
    

    On a windows laptop using a script(in my case a HP Elitebook 820) :

    Dim Wmi :Set Wmi = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
    Dim Arg, Col, Obj
    
    For Each Col In Wmi.ExecQuery("Select * from Win32_SystemEnclosure")
    For Each Obj In Col.ChassisTypes
     Select Case Obj
      Case 1  :Arg = "Other"
      Case 2  :Arg = "Unknown"
      Case 3  :Arg = "Desktop"
      Case 4  :Arg = "Low Profile Desktop"
      Case 5  :Arg = "Pizza Box"
      Case 6  :Arg = "Mini Tower"
      Case 7  :Arg = "Tower"
      Case 8  :Arg = "Portable"
      Case 9  :Arg = "Laptop"
      Case 10 :Arg = "Notebook"
      Case 11 :Arg = "Handheld"
      Case 12 :Arg = "Docking Station"
      Case 13 :Arg = "All-in-One"
      Case 14 :Arg = "Sub-Notebook"
      Case 15 :Arg = "Space Saving"
      Case 16 :Arg = "Lunch Box"
      Case 17 :Arg = "Main System Chassis"
      Case 18 :Arg = "Expansion Chassis"
      Case 19 :Arg = "Sub-Chassis"
      Case 20 :Arg = "Bus Expansion Chassis"
      Case 21 :Arg = "Peripheral Chassis"
      Case 22 :Arg = "Storage Chassis"
      Case 23 :Arg = "Rack Mount Chassis"
      Case 24 :Arg = "Sealed-Case PC"
      Case Else 
       Arg = "Unknown"
    End Select
    Next
    Next
    
    WScript.Echo " Type = " & Arg
    

    0_1459504853029_upload-b287f112-3912-478a-aa0b-5a154cdbbe02

    or via wmic :

    c:\wmic systemenclosure get chassistypes
    ChassisTypes
    {10}
    

  • Moderator

    You can script this. Just write a batch file to detect if there is a “Wireless Network Connection 1” or not… There are other ways too, like detecting if there is a battery percentage or not, if there is a lid-close setting available or not. Once you have these checks in a script and working, you can just push your snapin to all systems.



  • Now I just come to realize something, when I look at a group and I added snappins for that group, It is written: Add Snapin to all hosts in:Groupname

    I can also delete all snappins from the group. Now does this mean that if I added snappins at some point it will be pushed to all pc’s member of that group?

    I am asking since I use the Groups as OU’s and those OU’s contains both desktops and laptops, I have apps I manually choose when inventoring and imaging a pc with snappins depending on wether those are desktops or laptops, typically laptops have 3 more snappins installed. Now does this mean that the desktops within that group will also receive those applications installed?

    If the answer to this is yes then I guess I should separate my groups in 2…
    If the answer is no then maybe there should be another way to word it…

    Another thing is I see now that all 5 snappins I created are listed randomly during Full inventory as this : 5,4,1,3,2
    Any way to have those in ascending order? The groups do not have this issue.


Log in to reply
 

489
Online

39.4k
Users

11.1k
Topics

105.5k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.