Computer model token

This issue has been solved. See solution.
Teijo Hämäläinen's picture

Hello,

I'm attempting to create task in my deploy image job. This job is used with all computer models. This task should be executed only on specific computer models. I tried following script, but it looks like that my variable isn't correct. What is correct variable to computer model which can be seen, when you double-click computer from DS console and go to Hardware section and look for 'Product name'. I would like to have complete list of built-in tokens as well if such a list is available.

rem TPM installation

If %Model% == 7360d7g goto 1

goto Exit

:1
"\\server name\software\Winbond TPM driver 7360\setup.exe" -s -i "\\server name\software\Winbond TPM driver 7360\TPM_Installer.msi"

:Exit
Exit
 

jahnemar's picture

Try this

Solution

echo %#!computer@prod_name%
or
echo %#!computer@model_num%

Source


Teijo Hämäläinen's picture

Hi jahnemar, I managed to get

Hi jahnemar,

I managed to get my script working with your help. Following script checks model and executes setup.exe, if model name is correct.

rem TPM asennus

if "%#!computer@prod_name%" =="7360d7g" goto 1

goto Exit

:1
"\\server name\software\Winbond TPM driver 7360\setup.exe" -s -i "\\server name\software\Winbond TPM driver 7360\TPM_Installer.msi"

:Exit
Exit

Thank you so much.

spazzzen's picture

Conditions

We use conditions to let the DS check for models so we don't have to modify the script for new models.  Just filter by Computer Product name and make sure you change the condition to OR instead of AND if you want to run the task on more then 1 model.

Teijo Hämäläinen's picture

Hi Spazzen, I think

Hi Spazzen,

I think conditions are job-specific and not task-specific? I don't want to create two different jobs for deploying one workstation.