SCCM 2007 Variable from VBS Script
Posted on 2011-10-05
I am using the following vbs script in an attempt to pass the variable "migrate" into a Task Sequence in SCCM 2007.
Basically, the script asks the user if they wish to run the USMT section of the Task Sequence, with a "yes" or "no" button.
The idea is that when the Task Sequence gets to the USMT group, it will look at the value of the "migrate" variable, and will only run on condition that it equals 1 (i.e. user clicked yes).
Here is the script I have made:
Set migrate = CreateObject("Microsoft.SMS.TSEnvironment")
If MsgBox ("Is User State Migration Required?", vbYesNo, "USMT Request") = vbYes Then
migrate = 1
migrate = 2
So, the script runs fine and prompts the user correctly, but the Task Sequence does not run the USMT group, even if the user chooses "yes" at the prompt.
I know the USMT group works fine, because it runs if I remove the prompt and condition. So I can only assume that the "migrate" variable is not being passed through to the Task Sequence. (Therefore "migrate" does not equal 1, so the group does not run.)
Could anyone tell me if I have set up the script to pass the variable to the Task Sequence properly, or do I need to somehow create the variable in the TS before defining it in the script?
Hopefully I explained all that well enough!
Also, just one quick secondary question about posting on this site - where is the best place to post SCCM questions, I can't find anything specific in the zones?