November 23, 200718 yr 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 offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Customize Computer Build" /fREG ADD %KEY%01 /VE /D "Rename PC to Dell Service Tag" /fREG ADD %KEY%01 /V 1 /D "%systemdrive%\apps\rename\compname.exe /c ?s" /fREG ADD %KEY%02 /VE /D "Setup Step Two" /fREG ADD %KEY%02 /V 1 /D "%systemdrive%\apps\step2.cmd" /fREG ADD %KEY%03 /VE /D "Reboot PC" /fREG ADD %KEY%03 /V 1 /D "%systemdrive%\apps\reboot.cmd" /fEXITIn 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.exeFor 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
November 26, 200718 yr Author Thanks Cancerface. I have been trying to find it to save it as a fav so if I ever loose it.
May 13, 200818 yr Hi,I have tryed the solution but dont work for me.Can you please add the *.sif file and add more details please?Thanks.
Create an account or sign in to comment