RedVyper Posted May 17, 2004 Share Posted May 17, 2004 I hae a bunch of Dell GX150 machines I have the unattened windows XP setup and everything works perfect just 1 question how or is it even possible to get it to automatically name each computer by the asset tag number durring installation? Link to comment Share on other sites More sharing options...
teleri Posted May 17, 2004 Share Posted May 17, 2004 as posted in a similar thread the awnser is posted in this threadmsfn.org forum linkYou will need the compname program from herehttp://www.willowhayes.co.uk/then you modify the script used in the above linkECHO.ECHO Setting Computer NameECHO Please wait...for /f "tokens=1" %%i IN ('compname /d ?m') do set MAC=%%iIF %MAC% == 123456789012 compname /c SCRAPHEAPIF %MAC% == ABCDEFGHIJKL compname /c SANDBOXIF %MAC% == 11AA22BB33CC compname /c STELLARbut modify it to something like thisECHO.ECHO Setting Computer NameECHO Please wait...for /f "tokens=1" %%i IN ('compname /d ?s') do set %ASSET%=%%iIF %ASSET% == XXXXXXX compname /c Inspiron8200that Should work if you read the compname help file changeing the compname /d ?m to a 'compname /d ?s displays system serrial num and on my dell Inspiron 8200 from a comand prompt it works have not tetsted it in the script cause I name off of mac idsrember that the result is case sensitive h and also I rember seeing a post on the forum anbout useing a vb script program from microsofts technet that does this also Link to comment Share on other sites More sharing options...
[BM]Crusher Posted May 18, 2004 Share Posted May 18, 2004 for /f "tokens=1" %%i IN ('compname /d ?s') do set %ASSET%=%%ithat might or might not work, the correct syntax is:for /f "tokens=1" %%i IN (`compname /d ?s`) do set ASSET=%%ichanged %ASSET% to ASSETchanged the ''s to ``s Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now