01 December 2005

Special Tokens

%#!computer@model_num%

which means, look in the Express database for the DS we're connected to, read the computer table, and grab model_num for the machine who's id is %ID%

This is just a number though and it's not necessarily what you want.

If you want to know like, "Latitude D600" or something similar

use

%#!computer@prod_name%

Just be careful, because prod name always has a space in it, and if you're comparing two strings in DOS, like this

SET model=%#!computer@prod_name%

IF "%model%"=="Latitude D600" goto D600

IF "%model%"=="Latitude D610" goto D610

it'll jump to D600 every time, because it only compares the first word before the space. To get around this, I have created a custom view in SQL of the computer table the changes the spaces into _ so then I get "Latitude_D600" back, which works beautifully.

See also Nice forum article