|
Post by wolfymik on Jul 8, 2020 19:30:05 GMT
I don't know what I am doing wrong but I can't seem to get any vbscripting to work in the Default= section. For instance the taking the right most 13 characters of the computer name and listing it as the default contents of an input box.
<TextInput Prompt="System Name" Hint="Please enter the desired name for this system." RegEx="[A-Z,0-9]{7}\-[0-9]{5}" Variable="SystemName" Question="Name of this system" ForceCase="Upper" Default='Right("%_SMSTSMachineName%",13)' />
Any assistance is appreciated. I don't know if I am just typing something wrong or if this is just a limitation of the Default field.
|
|
|
Post by wolfymik on Jul 28, 2020 16:02:16 GMT
I wasn't able to figure out how to get this to work directly in the Default= attribute. However, I was able to find a workaround to address my issues. I needed to create a variable first that performed the vbscript actions, then I could reference the variable in the Default= attribute.
Example: <Action Type="TSVar" Name="MachineNameRoot">Right("%_SMSTSMachineName%",13)</Action>
<TextInput Prompt="System Name" Hint="Please enter the desired name for this system." RegEx="[A-Z,0-9]{7}\-[0-9]{5}" Variable="SystemName" Question="Name of this system" ForceCase="Upper" Default="%MachineNameRoot%" />
|
|