MDT 2012 - Logical operators in CS.ini

답변됨 MDT 2012 - Logical operators in CS.ini

  • 2012년 3월 19일 월요일 오전 2:21
     
     

    Guys,

    Is it possible to use logical operators in the CS.ini?  For example I want to specify if a computer has greater than 4.5GB RAM then go 64bit TS,  else go 32bit TS.  Possible to do just through the CS or require some sort of exit script? 

    Thanks!

모든 응답

  • 2012년 3월 19일 월요일 오후 3:59
     
     제안된 답변

    You can use a userExit script as documented here:

    http://myitforum.com/cs2/blogs/cnackers/archive/2010/11/02/microsoft-deployment-toolkit-mdt-user-exit-scripts.aspx

    • 답변으로 제안됨 JoeZeppy 2012년 3월 19일 월요일 오후 3:59
    • 답변으로 표시됨 mhouston100 2012년 3월 29일 목요일 오후 10:19
    • 답변으로 표시 취소됨 mhouston100 2012년 3월 29일 목요일 오후 10:20
    •  
  • 2012년 3월 20일 화요일 오전 12:41
     
     답변됨

    Yepp, Nackers samples are very good... Here is also a simlar userexit script I put together for a customer a whil ago (the difference is I don't pass the Memory property to the script, I have the script calling it directly, but end result is the same). The customer wanted to select a ThinPC task sequence if memory was below 3 GB.

    ******** BEGIN scriptthatselectstasksequence.vbs *********

    Function UserExit(sType, sWhen, sDetail, bSkip)

                    UserExit = Success

    End Function

    Function GetTSID()

                    If oEnvironment.Item("Memory") > 3000 Then
                                    GetTSID = "W7-X64-001"
                    Else
                                    GetTSID = "TPC-X86-001"
                    End if

    End Function

    ******** END scriptthatselectstasksequence.vbs *********

    You call the script by configuring your cs.ini with the following:

    [Settings]
    Priority=Default
    [Default]
    OSInstall=Y
    Userexit=scriptthatselectstasksequence.vbs
    TaskSequenceID=#GetTSID()#

    / Johan

              

    Regards / Johan Arwidmark Twitter: @jarwidmark Blog: http://www.deploymentresearch.com FB: www.facebook.com/deploymentresearch

    • 답변으로 표시됨 mhouston100 2012년 3월 29일 목요일 오후 10:20
    •  
  • 2012년 3월 20일 화요일 오후 8:34
     
     

    Joe,  I had seen that script first before I posted here.  I had modified it but could not get it to run correctly no matter what I did.

    I'm a little confused as to the syntax for exit scripts (I've been off sick so haven't had a chance to look into it more yet), so the 'Userexit=x' needs to come before the function is called?  And is it also possible to put into a subsection?  If so does the  'Userexit=x' go in the same subsection?

    Basically we have two builds based on make, each with 32 and 64bit,  so I would like to put a different userexit script in each 'Make' section of the CS.ini to decide between the two architectures per build.

    Thanks for your help both of you,  I'll give it another shot today now that I'm back!

    • 편집됨 mhouston100 2012년 3월 20일 화요일 오후 8:43
    •  
  • 2012년 3월 29일 목요일 오후 10:21
     
     

    Thanks Johan,  simple and effective,  worked like a charm.  Took a while for me to get back to it but implemented in less then two minutes.

    Thanks both of you for the help!