none
Tattoo in OSD RRS feed

  • Question

  • Hi,

    I want to implement Tattoo in OSD using SCCM-2012.

    Please suggest me the ways how to achieve it ?

    Thanks,

    Vishwajeet.

    Monday, May 28, 2012 5:45 AM

Answers

  • Hi,

    try this script out, I created two task sequence variables one for the task serguence version and one for the Client version in the TS then I pick them up in the script and writes it to the registry. Looking like this:

    Maybe this can help you. I run it from the TS using run command line and set the "disable 64-bit redirection"

    On error resume next
    dim osd
    dim strkeypath
    set env = CreateObject("Microsoft.SMS.TSEnvironment")

    const HKEY_LOCAL_MACHINE = &H80000002


    'variables
    AdvertisementID = env("_SMSTSAdvertID")
    Organisation = env("_SMSTSOrgName")
    TaskSequenceID = env("_SMSTSPackageID")
    Packagename = env("_SMSTSPackageName")
    MediaType = env("_SMSTSMediaType")
    TSVersion = env("TSVersion")
    ClientVersion = env("Clientversion")


    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")


    '----------- Write to registry ---------------

    strKeyPath = "SOFTWARE\CCMEXEC"
    oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath

    strValueName ="Installed Date"
    strValue = formatdatetime(date,2) & " " & formatdatetime(time,3)
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue

    strValueName = "AdvertisementID"
    strvalue = AdvertisementID
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,AdvertisementID

    strValueName = "Organisation"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,Organisation

    strValueName = "TaskSequence ID"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,TaskSequenceID

    strValueName = "TSVersion"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,TSVersion

    strValueName = "ClientVersion"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,ClientVersion


    -- My System Center blog ccmexec.com -- Twitter @ccmexec

    Monday, May 28, 2012 6:47 PM

All replies

  • Hi,

    If we are talking about the Tatto feature available in MDT start by installing MDT 2012 and create a Microsoft Deployment Toolkit Task Seqeunce in SCCM then you will have the Tatto step there.

    Regards,
    Jörgen


    -- My System Center blog ccmexec.com -- Twitter @ccmexec

    Monday, May 28, 2012 7:28 AM
  • Thanks for quick response.

    I will try and let you know the result. whether it worked or not ?

    Thanks again.

    Monday, May 28, 2012 8:52 AM
  • you don't have to use the MDT provided tatoo step, after all it just adds some reg keys on your system and you can do the same thing using a run command line step at the end of your task sequence for example like this

    reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Organization" /v DeployedImage /t REG_SZ /d "Success"



    Step by Step ConfigMgr 2007 Guides | Step by Step ConfigMgr 2012 Guides | I'm on Twitter > ncbrady

    Monday, May 28, 2012 11:20 AM
    Moderator
  • Hi,

    As Niall writes you can of course write a registry entry and then also extend the hardware inventory, as you wrote tattoo I assumed  you wanted to use the Tattoo step i MDT.

    Regards,
    Jörgen


    -- My System Center blog ccmexec.com -- Twitter @ccmexec

    Monday, May 28, 2012 12:03 PM
  • Hi Niall,

    Thanks for your advice. As you have mentioned that i can use run command line in TS. it can work for static value but what if i want to add deployment time stamp details in tattoo. and the values which are not constant in every deployment.

    Can i use MDT ts tattoo in sccm-2012 task sequence if yes then how ?

    Monday, May 28, 2012 12:14 PM
  • Actually i want to incorporate the following items  in the tattoo :-

    1. DeploymentType.

    2. TaskSequenceID.

    3.TaskSequenceVersion.

    4.TaskSequenceName.

    5.PackageID.

    6.PackageName.

    7.Deployment Timestamp.

    8.Organization Name.

    ..... etc.

    Monday, May 28, 2012 12:35 PM
  • if you want to use the MDT tattoo step then of course you can as long as you have a MDT Gather step beforehand and a Use Toolkit Package in order to make the scripts 'available' to your task sequence, have you tried it yet ?


    Step by Step ConfigMgr 2007 Guides | Step by Step ConfigMgr 2012 Guides | I'm on Twitter > ncbrady

    Monday, May 28, 2012 1:50 PM
    Moderator
  • Hi,

    try this script out, I created two task sequence variables one for the task serguence version and one for the Client version in the TS then I pick them up in the script and writes it to the registry. Looking like this:

    Maybe this can help you. I run it from the TS using run command line and set the "disable 64-bit redirection"

    On error resume next
    dim osd
    dim strkeypath
    set env = CreateObject("Microsoft.SMS.TSEnvironment")

    const HKEY_LOCAL_MACHINE = &H80000002


    'variables
    AdvertisementID = env("_SMSTSAdvertID")
    Organisation = env("_SMSTSOrgName")
    TaskSequenceID = env("_SMSTSPackageID")
    Packagename = env("_SMSTSPackageName")
    MediaType = env("_SMSTSMediaType")
    TSVersion = env("TSVersion")
    ClientVersion = env("Clientversion")


    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")


    '----------- Write to registry ---------------

    strKeyPath = "SOFTWARE\CCMEXEC"
    oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath

    strValueName ="Installed Date"
    strValue = formatdatetime(date,2) & " " & formatdatetime(time,3)
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue

    strValueName = "AdvertisementID"
    strvalue = AdvertisementID
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,AdvertisementID

    strValueName = "Organisation"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,Organisation

    strValueName = "TaskSequence ID"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,TaskSequenceID

    strValueName = "TSVersion"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,TSVersion

    strValueName = "ClientVersion"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,ClientVersion


    -- My System Center blog ccmexec.com -- Twitter @ccmexec

    Monday, May 28, 2012 6:47 PM
  • Thanks a lot for the script. The script is working fine in my sccm-2012 environment.

    I have created sccm-2012 task sequence and executed this script as "Run Command Line". But one doubt i have in my mind is that should we assign the value to the two task sequence variables you have advised me to create such as "Clientversion" and "TSVersion". Initially i had created these two task sequence variables but have not assigned any value to it due to this i think when i looked in to registry setting i found that the values of these task sequence variables "Clientversion" and "TSVersion" were empty.

    One more thing i would like to know  is it possible to display the organization name in hexadecimal format ?

    Thanks,

    Vishwajeet.


    Tuesday, May 29, 2012 6:38 AM
  • Hi

    Do you also have an example on how to get this information from computers with the reporting feature in SCCM 2007?

    I'm thinking about what to editing/type in the SMS_DEF.MOF and Configuration.MOF, then the query for the report to show this information for all computers?

    So that we can run reports to see when the computers were deployed, what version of the task sequence it was deployed with and so on.

    Thank you very much :)

    Wednesday, December 5, 2012 12:53 PM
  • I've modified the above script so that I can call it during TS with parameters different parameters for build and install... now I have the full information in the registry about the build itself and the actual installation. Thumbs up! :)
    Thursday, December 6, 2012 8:20 AM
  • Hi,
    Check out this blog post on the topic. http://ccmexec.com/2012/08/script-to-tattoo-the-client-registry-during-osd/

    There are screenshots..

    /Jörgen


    -- My System Center blog ccmexec.com -- Twitter @ccmexec

    Friday, February 20, 2015 7:51 AM
  • Hi,

    The Set variables doesn't require a package, only one for the script needs to be created, the others are Set Task Sequence variables steps.

    Regards,
    Jörgen 


    -- My System Center blog ccmexec.com -- Twitter @ccmexec

    Friday, February 20, 2015 8:40 AM
  • Just follow Jörgen's blog article. It contains all you need.

    Torsten Meringer | http://www.mssccmfaq.de

    Friday, February 20, 2015 10:16 AM