Video Screencast Help
Protect Your POS Environment Against Retail Data Breaches. Learn More.

Altiris 7.1 mp1, how to change name when booted to pxe

Created: 31 Jan 2013 | 15 comments

When booting a new machine in to PXE, the name is assigned as MiniNTxxx, how can we change that before we apply an image job?

 

Thanks.

Comments 15 CommentsJump to latest comment

Nelo's picture

you could use predefined computers. Assign a MAC address to a computer will give it that name. 

refer to Article URL http://www.symantec.com/docs/HOWTO41864

 

 

Nelo's picture

from the howto read How to create a Predefined Computer using MAC address only in DS 7.1.docx   to get an idea how that works.

mclemson's picture

You can write a VBScript that runs in WinPE before the PECTAgent initializes.  The VBScript will prompt for user input at which point you can enter a string.  If you write the string to the registry (Hostname value at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters), when the PECTAgent initializes, it will pull this value instead of the randomly-generated MININT value.  Include the .vbs in the image or scripted OS install files that are copied down, then call using a modified runagent.bat.  After modifying runagent.bat, you'll need to recreate your preboot environments.

Mike Clemson, Senior Systems Engineer, ASC
Intuitive Technology Group -- Symantec Platinum Partner
intuitivetech.com

Tim.Jing's picture

There is no way for a technician or analyst to have a customer boot in to WinPE, and then change the name through the console like in DS 6.x?

mclemson's picture

Correct.  Unfortunately, there is not a console-based method for changing the computer name.  The computer name can only be read through the computer name in the registry.  One method is to write that value (as I mentioned) in WinPE before the PECTAgent starts.  When it starts, it reads the value you wrote, and puts that value in the console also.

Other methods include any supported method for actually changing the computer name, such as Apply System Configuration tasks sent from the console once the system has been imaged.

Mike Clemson, Senior Systems Engineer, ASC
Intuitive Technology Group -- Symantec Platinum Partner
intuitivetech.com

jpellet2's picture

We actually do something very similar except instead of writing directly to the registry we append the unattend.xml directly and replace the computer name in there. The results are the same as what mclemson mentioned and it has worked quite well. Using a method likes this can allow you to create all kinds of input dialogs such as changing the company name or location before installation if there's a need for that.

mclemson's picture

It also lets you do all sorts of modifications that don't have any input at all, but still modify the unattend.  For example, based on subnet, modify the Time Zone, etc.  No user input but you're still parsing the unattend.xml using tokens and you're still leveraging Altiris to do smarter deployments.  Good stuff!

Mike Clemson, Senior Systems Engineer, ASC
Intuitive Technology Group -- Symantec Platinum Partner
intuitivetech.com

Gibson99's picture

this (lack of an obvious naming mechanism) was the reason i came up with my vbs and custom token system for the unattend file.  however, my methods won't work for you directly... we name our machines using their serial number, not their physical location, so it's really easy to do it unattended - it's just a wmi call.  then again, it probably wouldn't be too hard for you to have a machine prompt for a computername via VBS right after it finishes booting into winpe, then store that in a file on the ramdrive (X:), then use that later on to populate your unattend file using token replacement.  i also use these custom tokens for setting the time zone based on which pxe server it booted from (dunno if you can still do that in 7.1), and also injecting a few items into the system properties screen - it now shows you the model name and date the machine was imaged when you right-click Computer and hit properties.  

prompting during a build sure stinks though - rather takes away from the whole "automation" aspect of this platform.  

If a Connect post helped you out, be sure to click "Mark As Solution" or the "Thumbs Up" button to let other users know about it.

mclemson's picture

If you prompt after WinPE but before PECTAgent loads and write to the location I provided, it will use that as the computer name in the console.  You can then replace using the %COMPUTERNAME% token.

Mike Clemson, Senior Systems Engineer, ASC
Intuitive Technology Group -- Symantec Platinum Partner
intuitivetech.com

Tim.Jing's picture

Mike, this would be prompted on the local machine and not the console?

 

Gibson99, you are correct, we have a odd naming system which would be nice to just pull a name that's in the console rather than having to prompted it on the user end.

Gibson99's picture

to answer both:

yes, prompt on local machine (thus my comment about not being very automated)

i wonder if you can do a little sql magic and have it find itself in the DB based on a guid or computer_id, then locate the computer_name associated with that computer_id... then have it rename itself before pectagent starts.  seems like something symantec themselves should have done, IMHO, but didn't.  that would automate it so you could still reimage via console without having to physically touch the machine...  you'd probably have to create a stupid little limited-access sql account so that it's not using your service account creds, since all it needs is read-only.  

If a Connect post helped you out, be sure to click "Mark As Solution" or the "Thumbs Up" button to let other users know about it.

mclemson's picture

Yes, this is prompted on the local machine, which is the way to do it if the computer name is not predictable.

If computer name is predictable, you can parse your unattend to replace computer name in the unattend.xml with a tokenized standard name.  You could create a standard token called StandardCompName and write the SQL such that it builds the name correctly.

Mike Clemson, Senior Systems Engineer, ASC
Intuitive Technology Group -- Symantec Platinum Partner
intuitivetech.com

Nelo's picture

for DS 7.1 using a VB script before pectagent does the trick, like mclemson stated.

 

Tim.Jing's picture

Nelo, this is prompting a user for input correct? Not automating the CompName from the Console/Database?

BugTastic's picture

It would be good if you guys could post the VB scripts for use. I would like to do something like this also.
Thanks
Joe.