Jump to content

Recommended Posts

Posted

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?


Posted

as posted in a similar thread the awnser is posted in this thread

msfn.org forum link

You will need the compname program from here

http://www.willowhayes.co.uk/

then you modify the script used in the above link

ECHO.

ECHO Setting Computer Name

ECHO Please wait...

for /f "tokens=1" %%i IN ('compname /d ?m') do set MAC=%%i

IF %MAC% == 123456789012 compname /c SCRAPHEAP

IF %MAC% == ABCDEFGHIJKL compname /c SANDBOX

IF %MAC% == 11AA22BB33CC compname /c STELLAR

but modify it to something like this

ECHO.

ECHO Setting Computer Name

ECHO Please wait...

for /f "tokens=1" %%i IN ('compname /d ?s') do set %ASSET%=%%i

IF %ASSET% == XXXXXXX compname /c Inspiron8200

that 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 ids

rember 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

Posted
for /f "tokens=1" %%i IN ('compname /d ?s') do set %ASSET%=%%i

that might or might not work, the correct syntax is:

for /f "tokens=1" %%i IN (`compname /d ?s`) do set ASSET=%%i

changed %ASSET% to ASSET

changed the ''s to ``s

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...