Deployment Solution

 View Only
  • 1.  Problems renaming computers with ImageX and Windows 7

    Posted Oct 21, 2010 01:55 PM

    We are using DS 6.9 SP3 and I have been able to create an image that has all the drivers for the different platforms using ImageX and DISM.  THe problem is is getting Altiris to rename the computer and add it to the domain.

    I have read all of the information that is out there on how to get a computer renamed using replace token and it is great but how do I take this information and translated it over to how I am imaging?

    What I am doing when I am pushing an image is the following

    REM Delpoys Windows 7
    net use w: \\apis01p\express
    net use q: \\apis01p\express\images\windows\w7\imagex

    REM Starts Disk partiton process to create system partition and Windows partition
    diskpart /s w:\diskpartscript.txt
    REM Deploying Image
    w:\waik\tools\x86\imagex /apply q:\w7v3.wim 1 d:
    w:\waik\tools\x86\bcdboot d:\windows

    The contents of the diskpart script are as follow:

    select disk 0
    clean
    create partition primary size=100
    select partition 1
    format fs=ntfs quick
    active
    create partition primary
    select partition 2
    format fs=ntfs label="Windows" QUICK
    select volume 0
    remove letter=d noerr
    assign letter=e noerr
    select volume 2
    assign letter=d
    exit

    So what can I do to get the computer renamed to the correct name and added to the domain with the imaging process that I am currently using?

    What am I over looknig or missing?

    Thank you in advance for everyones help on this.



  • 2.  RE: Problems renaming computers with ImageX and Windows 7

    Posted Oct 21, 2010 02:25 PM

    GlennBC

    We are not doing much imaging yet with Windows 7 , but with XP I know this is typically done through your sysprep settings. In the deploy image job, there was in 6.9 anyway, an option to specify your sysprep.ini file. In there you will have a UserData section something like

    [UserData]
    ComputerName = %COMPNAME%
    FullName = %USER_NAME
    OrgName = %ORG_NAME%
    ProductKey = %PROD_LIC%
    
    As you mentioned these tokens from the deployment console with be replaced when the image is applied.
    This is definately not Win7 specific but hopefully will give you a starting place, for Win7 sysprep info try checking out:
    http://blog.brianleejackson.com/sysprep-a-windows-7-machine-%E2%80%93-start-to-finish-v2
    


  • 3.  RE: Problems renaming computers with ImageX and Windows 7

    Posted Oct 21, 2010 02:49 PM

    I have already attempted to use the variable %COMPNAME% in the unattend.xml, however it did not work :(



  • 4.  RE: Problems renaming computers with ImageX and Windows 7

    Posted Oct 21, 2010 11:12 PM

    In my case the XML also contains the %COMPNAME% as computer name, which works perfectly well. Do you also run a ReplaceTokens command against the XML prior to injecting it to the target machine?

    With regards to joining the AD, which approach do you take (thru the XML as well or using a PS/VB/whatever script)?

    -BBC



  • 5.  RE: Problems renaming computers with ImageX and Windows 7

    Posted Oct 26, 2010 01:04 PM

    BBC to quiet honest with you I am new at this and I am not familar with the ReplaceTokens command or how to use it in the manner you are taking about. So if you can educate me as to how to use the ReplaceTokens command I will try it.  Does it replace the computer name token (%compname%) with the computer that you have pre-defined in the console or that already exsits in the console?



  • 6.  RE: Problems renaming computers with ImageX and Windows 7
    Best Answer

    Posted Nov 01, 2010 10:02 AM

    Hi GlennBC,

    Below is an example of how to use it. Please let me know if you need any further information.

    Run an embedded script within your process that contains a line like the below, only adjust the path statements for your environment of course:

    REM ReplaceTokens .\Deploy\AnswerFiles\AutoUnattend.xml .\temp\%ID%.xml

    At a later stage in your build process you will then copy that file across to the target machine by referring to that %ID%.XML. Note, you can always change the target extension to whatever you want or need to, so no need to stick with that either!

    COPY /Y \\%DSSERVER%\eXpress\temp\%ID%.xml C:\Disney\AutoUnattend.xml

    Here again, make sure you have the source and destination path statements adjusted for your environment.

    Summarized, it's like that:

    If you use Altiris variables like %COMPNAME%, etc from within an embedded script, they will automatically be replaced with the value. if they are used in a file of whatever type and extension, you need to tell Altiris to walk thru the file and replace any of these variables with its values from that Deployment Server (that's where the REM ReplaceTokens command kicks in).

    -BBC



  • 7.  RE: Problems renaming computers with ImageX and Windows 7

    Posted Nov 09, 2010 03:05 PM

    BBC thank you that helped out more than you could ever think.  I appreciate the time you took to lay that out the way you did.

     

    GC