IT Management Suite

  • 1.  Insert Computer Name in to Unattend.xml?

    Posted Jun 24, 2010 11:54 AM
    Afternoon, I have sucessfully build and automated a Windows 7 install, everything is working great, however the only way I have been able to generate a computer name is by using the " * " prefix to generate a random one, after the image is put on and the scripts run, "modfiy configuration" changes the computer name to the name set up for it in the deployment console. This is fine, but I'd like the name to be set from the start and not change. Basically my question is, is there a script or token that you can run in order to pull the computer name from the deployment console before windows runs for the first time and creates a random computer name? Any help would be greatly appreciated. Thanks Jon


  • 2.  RE: Insert Computer Name in to Unattend.xml?

    Posted Jun 24, 2010 12:24 PM

    Using firm copy you can import a tokenized unattend.xml with the %COMPNAME% token. As long as you are imaging the box from the DS console, it will pull the name from the DS Console and replace it in the proper place in sysprep.

    Here is an example script, run after the image, but it MUST be run in automation. (I do add the BCDEDIT in the same script).

    REM Image Scripting Post Install
    REM Replace Tokens for Sysprep.inf
    REM ReplaceTokens .\deploy\scripts\unattend.xml .\temp\%COMPNAME%.xml

    Echo Copying Updated Sysprep.inf
    .\Rdeploy\windows\firm.exe copy .\temp\%COMPNAME%.xml prod:windows\panther\unattend.xml

    REM BCEDIT to change boot config..
    BCDEDIT /set {bootmgr} device partition=c:
    BCDEDIT /set {default} device partition=d:
    BCDEDIT /set {default} osdevice partition=d:




  • 3.  RE: Insert Computer Name in to Unattend.xml?

    Posted Jun 25, 2010 05:44 AM

    I am imaging from the DS console through WinPE 2.1.

    If my altiris installation is on: \\strontium\express would that script work out of the box? Or would I have to change some of the variables? My .xml file is also called autounattend.xml so obviously I'd have to change this too. My updated autounattend.xml is only currently hosted on \\strontium\express\Sysprep,

    Hope this makes sense.

    Thanks
    Jon
     

    


  • 4.  RE: Insert Computer Name in to Unattend.xml?

    Posted Jun 25, 2010 11:29 AM

    All my computers are named 'ZZZZ'.  But they can't login until I finish my updates.  The first update is a script that sets the computername to the first part of the hostname.



  • 5.  RE: Insert Computer Name in to Unattend.xml?

    Posted Jun 25, 2010 11:30 AM

    reflect the proper location. .\deploy means in the root (or express share) there is a deploy folder. So wherever your customized .xml resides, you would put that path. I used unattend.xml, as I've seen some back and forth about what exactly the name has to be, but they all seem to indicate it must reside in the panther directory to execute properly.

    So if autounattend.xml works for you, I'm sure it's fine.


  • 6.  RE: Insert Computer Name in to Unattend.xml?

    Posted Jul 19, 2010 05:02 PM
    x jharings ...

    Hi, Why do you use FIRM instead of a simple copy like this?

    [...]

    REM Apply image to drive
    .\WAIK\Tools\x86\imagex /apply .\lcfib\win7_v1.wim 1 c: 
     
    REM ReplaceTokens .\lcfib\unattend.xml .\temp\unattend%ID%.xml
    copy /y .\temp\unattend%ID%.xml c:\windows\system32\sysprep\unattend.xml
    copy /y .\temp\unattend%ID%.xml c:\windows\panther\unattend.xml
    [...]

    And, why the BCDEDIT commands? I suppose because your image isn't a sysprep'ed one is it?
     


  • 7.  RE: Insert Computer Name in to Unattend.xml?

    Posted Jul 30, 2010 11:37 PM

    I was using RDeploy, and I got an invalid system drive error (which is often mentioned in Windows 7 related posts), which BCDEDIT fixed. As for the way I chose to do it, it worked for me at the time. Glad you found an alternate solution.

    My primary reason for using FIRM is that I can copy whatever I want in, during automation prior to the first boot. I've been using it for years with great success, but I'm always happy to hear about (and try out) other methods.