Cisco VPN will not install during OSD if wmi query is used
The CISCO VPN client will not install with task sequence if there is a wmi query, however if there is no query it installs fine. Do you think something is wrong with the query? When I test the query, it tests fine, but if I have it enabled the VPN client will not install Here is my query. SELECT * FROM Win32_ComputerSystem WHERE Model LIKE "%64% or %1014% or %35%"
November 4th, 2011 9:49am

Hi, I would try using a query with one of the LIKE values on a computer where it is valid. You can always split the queries to three and use the IF ANY statement in the task seqeunce. Regards, Jörgen-- My System Center blog ccmexec.com -- Twitter @ccmexec
Free Windows Admin Tool Kit Click here and download it now
November 4th, 2011 10:20am

That query will not work... it is looking for a model name containing the string "%64% or %1014 or %35%", which is not what you want. I have not tried using OR operators, however I would suggest you use a IF ANY statement: IF ANY Select * FROM Win32_ComputerSystem WHERE Model LIKE "%64%" Select * FROM Win32_ComputerSystem WHERE Model LIKE "%1014%" Select * FROM Win32_ComputerSystem WHERE Model LIKE "%35%" I am not sure really sure what the 64, 1014 or 35 are in your scenario but if you are checking for laptops it might be better just to look for the laptop chasis types (Win32_SystemEnclosure). I think you need to check for chassis types 8,9,10,11,12,14,18, & 21, That would prevent you from having to change the queries if any new laptops are added. If you are using MDT integration then you can just check for the "isLaptop" TS variable being equal to True as MDT does the work for you. Mark.
November 4th, 2011 10:20am

Mark. That helps a lot. I like the idea of using Win32_SystemEnclosure and then use the chassis type because that will put it on any equipment that matches that chasis type correct, so I no longer need to update everytime we get a new model. I think that is what you are saying? I looked it up and I think i would need 8, 9, 10 as that is Portable, laptop, notebook.
Free Windows Admin Tool Kit Click here and download it now
November 4th, 2011 10:37am

There is a laptop variable built-in to OSD, although it *may* require MDT integration - that part I'm not sure about. But you should be able to use Add Condition -> Task Sequence Variable -> IsLaptop EQUALS True. Again, you may need to integrate MDT for this to work.--Joe.
November 4th, 2011 12:36pm

Mark. That helps a lot. I like the idea of using Win32_SystemEnclosure and then use the chassis type because that will put it on any equipment that matches that chasis type correct, so I no longer need to update everytime we get a new model. I think that is what you are saying? I looked it up and I think i would need 8, 9, 10 as that is Portable, laptop, notebook. Yes, checking for it being a laptop is better than specific types of laptops as you would need to maintain the list of models. As I said if you have already integrated with MDT then you won't need the WMI query, just check for isLaptop = True. If you haven't integrated MDT then I can highly recommend it. If you don't want to go down the MDT route at this stage then you will need to use the WMI queries against Win32_SystemEnclosure. The chassis types 8,9,10,11,12,14,18, & 21 are the ones which MDT checks for in order to set the isLaptop variable so you might want to check for all of them just in case. Mark.
Free Windows Admin Tool Kit Click here and download it now
November 4th, 2011 5:44pm

I tried using the isLaptop = True and it did not work, not sure if our MDT is not working correct. I imaged a desktop and laptop and it just didn't install at all on the desktop or the laptop. So then I tried the Query WMI in the task sequence with the following, but when I test the query it says its invalid query: select * from Win32_SystemEnclosure where ChassisTypes = "9"
May 8th, 2012 7:02pm

Thank you I will take a look at your script. In Regards to the MDT. Im told its implemented, but to me I guess its not working right or they have something wrong? The option to use Task Sequence Variable is available under the condition option and I did the following, but maybe did it wrong? Variable: IsLaptop Condition: Equals Value: True Maybe i have something wrong or maybe MDT is not implemented like the Network guys say?
Free Windows Admin Tool Kit Click here and download it now
May 9th, 2012 7:26am

I do have all those options available that you mention, Create MDT task sequence, Create Boot Image Using MDT. So at this point looks like the current TS are the native configMgr task sequences. So if I want to start using MDT then I think I have to not only create new TS using MDT, but I will probably have to build and capture the image using MDT, probably cant use my current boot images?
May 9th, 2012 8:43am

To start gaining the benefits of MDT you will have to create a new task sequence using the MDT client template. However once you have created the new task sequence you should be able to copy/paste your existing TS actions across for installing software etc. There is no reason why you would need to change the way in which you create your OS image. The MDT task sequence will quite happily deploy an image created using the native ConfigMgr functionality. I create my OS images outside of ConfigMgr using MDT lite touch and then use ConfigMgr/MDT to deploy them. The same applies to the boot image... you have the option to use MDT to create a boot image but the MDT task sequence will work with the built-in ConfigMgr ones. The MDT boot image wizard just gives you a few more options for customising the boot image like injecting additional files, fonts etc. Mark.
Free Windows Admin Tool Kit Click here and download it now
May 9th, 2012 9:20am

Here is a vbscript you can use.. it's based on the same logic that MDT provides. Just save this as a .vbs then add a run command line step to your task sequence to call it. It will set three task sequence variables (isLaptop, isDekstop and isServer) to either true or false. After the script has run you can check for isLaptop=True on your VPN client install step. As I said if you are not using the MDT integration then I highly recommend it, it will avoid you (and me :-)) having to write scripts like this as they already provide them out of the box. Mark. Dim oContext, oLocator, objWMI Dim bIsLaptop, bIsDesktop, bIsServer Dim objResults, objInstance Set oContext = CreateObject("WbemScripting.SWbemNamedValueSet") oContext.Add "__ProviderArchitecture", 64 Set oLocator = CreateObject("Wbemscripting.SWbemLocator") Set objWMI = oLocator.ConnectServer("","root\cimv2","","",,,,oContext) Set objResults = objWMI.InstancesOf("Win32_SystemEnclosure") bIsLaptop = false bIsDesktop = false bIsServer = false For each objInstance in objResults If objInstance.ChassisTypes(0) = 12 or objInstance.ChassisTypes(0) = 21 then ' Ignore docking stations Else Select Case objInstance.ChassisTypes(0) Case "8", "9", "10", "11", "12", "14", "18", "21" bIsLaptop = true Case "3", "4", "5", "6", "7", "15", "16" bIsDesktop = true Case "23" bIsServer = true Case Else ' Do nothing End Select End if Next Set osdV4 = CreateObject("Microsoft.SMS.TSEnvironment") osdv4("IsLaptop") = ConvertBooleanToString(bIsLaptop) osdv4("IsDesktop") = ConvertBooleanToString(bIsDesktop) osdv4("IsServer") = ConvertBooleanToString(bIsServer) Function ConvertBooleanToString(bValue) Dim iRetVal iRetVal = Failure If bValue = -1 Then iRetVal = "True" ElseIf bValue = 0 Then iRetVal = "False" End If ConvertBooleanToString = iRetVal End Function Mark_Thomas. So i was able to get this working with the script and then isLaptop=True in the Task Sequence, however we came across a problem I just noticed. For some reason when this is enabled it causes a problem with the configuration mangager client. After the OSD is complete I check the configuration manager client and under site mode is shows as "unknow". If I disable this step, perfor the OSD on another laptop and after OSD I check the configuration Manager client and it looks fine, shows as "Mixed" mode. Not sure why this is causing an issue, the only thing I can think of initially is that the cisco vpn client requires a reboot after install and I wonder if that is causing the problem?
August 18th, 2012 7:59pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics