Jump to content

Rename Dell PC the Service Tag


Recommended Posts

I name all my PC's on the network to the Dell Service Tag, and when I turned to RIS I found that to acheive this was rather difficult to automate. There where a few threads that explained how to pull it out using WMI or something that was hard to follow and implement. I found an easy method that I thought I would share. If this has been shared in the past please forgive me as I have not been able to find it.

My first RunOnceEx.cmd only responsibility it to rename the PC, import a second RunOnceEx.cmd, and reboot. Here is the Code:

@echo off

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Customize Computer Build" /f

REG ADD %KEY%01 /VE /D "Rename PC to Dell Service Tag" /f
REG ADD %KEY%01 /V 1 /D "%systemdrive%\apps\rename\compname.exe /c ?s" /f

REG ADD %KEY%02 /VE /D "Setup Step Two" /f
REG ADD %KEY%02 /V 1 /D "%systemdrive%\apps\step2.cmd" /f

REG ADD %KEY%03 /VE /D "Reboot PC" /f
REG ADD %KEY%03 /V 1 /D "%systemdrive%\apps\reboot.cmd" /f

EXIT

In my $oem$\$1\apps folder I placed a rename folder with a program called compname.exe. Simply put /c ?s changes the name of the PC to the System Serial Number, which in Dell's Case is the Service Tag.

When my PC runs this and reboots I have a PC named ready to load apps in phase two and then join the domain using netdom.exe

For those who may need it I will attatch the compname.exe as I cannot remember where I found it, but it is freeware.

compname.zip

Link to comment
Share on other sites


  • 5 months later...

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...