Copyright © Expert Networking Group Limited 44 Scenario Selecting owner of machine from AD using search filters Modify the standard zim.cfg file ; Authenticate to LDAP server LDAP:Init, labsrv.engllab.local ,389 LDAP:Bind, cn=Administrator,CN=users,DC=engllab,DC=local , P@ssw0rd If:Var,_error,eq,1 Dialog:Ask, LDAP Bind Error , %_ldaperrorstr% , _any ,RED LDAP:Unbind Goto:TheEnd End: ; Launch a Form to display detected hardware and select machine type Form:Start, Info , Hardware Detected , _OkCancel^_Ok ,Blue Form:Item, Item1 ,StaticText, -Manufacturer : %lookup_section% Form:Item, Item2 ,StaticText, -Model : %lookup_value% Form:Item, Item3 ,StaticText, -Hardware Image : %drivers_image% Form:Item, Item4 ,StaticText, -Hardware Type : %machine_type% Form:Item, Item5 ,StaticText, -OS : %project_os% Form:Item, Item6 ,Label, Computer Name : Form:Item, Item7 ,EditBox, %COMPUTERNAME% Form:Item, Item8 ,Label, Select Owner : Form:Item, item9 ,ListBox_LDAP, , OU=users,OU=itz6,DC=engllab,DC=local ,ONELEVEL, (objectclass=Person) , cn Form:Item, Item10 ,Label, Auto Restart after imaging: Form:Item, Item11 ,Radiobuttons, Yes , Yes,No Form:Display, Info If:Var,_Form,Eq, _Cancel Menu:Return End: Set:Ask_COMPUTERNAME,%_Info_item7% Set:ask_owner,%_Info_item9% Set:AutoRestart,%_Info_item11% If:Var,Ask_COMPUTERNAME,ne, %COMPUTERNAME% Set:COMPUTERNAME, %Ask_COMPUTERNAME% End:
{}