Deployment and Imaging Group

 View Only
  • 1.  Token replacement not working

    Posted Jan 24, 2016 02:05 PM

    Hi I built a windows 10 image , I created a custom unattend.xml and using that. I added the following line to replace the cmputer name to my predefined computer that I choose but name is not replaced. Just want to know how and when the tokens are replaced and what I am doing wrong here please. 

     

    <ComputerName>%COMPNAME%</ComputerName>

     



  • 2.  RE: Token replacement not working

    Posted Jan 24, 2016 03:58 PM

    Hi,

    you make a mistake using token : for computername the right token is %NAME% (in uppercase). you can find all token in DS user doc if I well remember.

    I've just read another thread about token :

    https://www-secure.symantec.com/connect/forums/tokens-variables-gss-30

    You'll find all information about token (DS or GSS 3.0)



  • 3.  RE: Token replacement not working

    Posted Jan 24, 2016 11:09 PM

    Thank you David, another article mentioned use %COMPNAME% So I tried this and did used %NAME% as well but its not replaced, what stage tokens are replaced?  When I ran the sysprep I used this command "C:\windows\system32\sysprep\sysprep /generalize /oobe /unattend:unattend.xml /shutdown"

     

    when I look at sysprep now it has %NAME% for the computer name but its not replaced by the name in console rather it gives its a random name. 

     

    Help 



  • 4.  RE: Token replacement not working

    Posted Jan 25, 2016 02:13 AM

    can you post all the script you're using for OS deployment ?



  • 5.  RE: Token replacement not working

    Trusted Advisor
    Posted Jan 25, 2016 04:23 AM

    Hi Skhs,

    What method are you using for replacing the text between the <ComputerName> tags?

    Thanks



  • 6.  RE: Token replacement not working
    Best Answer

    Trusted Advisor
    Posted Jan 25, 2016 04:43 AM

    %COMPNAME% is certainly a valid computer token. The valid in-built tokens for DS7.6 for Windows OS imaging are,

    • %COMPNAME%
      Actual computer name used by the OS
       
    • %MODELNUMBER%
      Model number of the computer
       
    • %OS%
      Specific operating system (Win98, Win2K, WinXP,Linux)
       
    • %SERIALNUMBER%
      Serial number from SMBIOS
       
    • %TRIMSERIALNUMBER%
      Serial number from SMBIOS without black spaces

     

    However, it's well worth taking a read of Chapter 5 of the DS7.6 User guide. This covers all the steps needed to create and distribute your Windows images. It sound like you are doing some steps here manually that you don't need to (DS is designed to automate to a high degree).

    Kind Regards,
    Ian./



  • 7.  RE: Token replacement not working

    Posted Jan 25, 2016 08:47 AM

    Hi , My sysprep is in C:\Windows\sysprep folder and image was captured without the agent installed.

    Sysprep was ran with this command C:\windows\system32\sysprep\sysprep /generalize /oobe /unattend:unattend.xml /shutdown

    Then image was captured using Ghost and then imported into console. 

    Below is part of my unattend.xml file 

     

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="generalize">
            <component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <SkipRearm>1</SkipRearm>
            </component>
        </settings>
        <settings pass="specialize">
            <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <RunSynchronous>
                    <RunSynchronousCommand wcm:action="add">
                        <Order>1</Order>
                        <Path>net user administrator/active:yes</Path>
                    </RunSynchronousCommand>
                </RunSynchronous>
            </component>
            <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <SkipAutoActivation>true</SkipAutoActivation>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <CopyProfile>true</CopyProfile>
                <ShowWindowsLive>false</ShowWindowsLive>
                <TimeZone>US Eastern Standard Time</TimeZone>
                <ComputerName>%COMPNAME%</ComputerName>  (I tired %NAME% as well)
            </component>
            <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <Identification>
                    <Credentials>
                        <Domain>test.sym</Domain>
                        <Password>administrator</Password>
                        <Username>Symantec1</Username>
                    </Credentials>
                    <Provisioning />
                    <JoinDomain>test.sym</JoinDomain>                  
            <UnsecureJoin></UnsecureJoin>
                </Identification>



  • 8.  RE: Token replacement not working
    Best Answer

    Broadcom Partner
    Posted Jan 25, 2016 11:33 AM

    Hi skhs,

    I assume you are using DS 7.6?

    If you want to do your own Token Replacement I would recommend using the following Link: https://www-secure.symantec.com/connect/downloads/deployment-solution-samples-v71-sp1-x64-smpcms-71updated-522011

    Download the Deployment Solution Samples within these you will find a Task that allows you to do a Token Replacement (see list below or the Link above).

    This still works with 7.5 and 7.6.

    Custom Tasks to:

    • Capture a Hot Image backup using Ghost (in production = no down time)
    • Perform offline DISM updates to an image
    • Automatically configure advance DS logging options
    • Add the Altiris Agent to an image that was captured without it (performed in automation)
    • Enable all SBS services on a Site Server, including setting up dependencies
    • Disable all SBS services on a Site Server
    • Turn off, or on, UAC (Win7/Vista)
    • Evaluate a system using DeployAnywhere to determine if drivers are missing.
    • Manual execution of DeployAnywhere
    • Token Replacement task (eg for Sysprep/unattend files) 
    • Drive mappings in automation for custom scripting jobs
    • ImageX

    Network23