Monday, March 19, 2012 2:21 AM
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?
Monday, March 19, 2012 3:59 PM
You can use a userExit script as documented here:
Tuesday, March 20, 2012 12:41 AM
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
If oEnvironment.Item("Memory") > 3000 Then
GetTSID = "W7-X64-001"
GetTSID = "TPC-X86-001"
******** END scriptthatselectstasksequence.vbs *********
You call the script by configuring your cs.ini with the following:
Regards / Johan Arwidmark Twitter: @jarwidmark Blog: http://www.deploymentresearch.com FB: www.facebook.com/deploymentresearch
- Marked As Answer by mhouston100 Thursday, March 29, 2012 10:20 PM
Tuesday, March 20, 2012 8:34 PM
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!
- Edited by mhouston100 Tuesday, March 20, 2012 8:43 PM
Thursday, March 29, 2012 10:21 PM
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!