Answered custom tasks not being logged

  • Friday, November 09, 2012 11:32 AM
     
     

    Hi,

    I'm deploying a windows 7 image to a computer that has a virus.

    I'm re-applying the image the computer was initially set up with to get rid of the virus.

    The computer has two partitions, C:\ and D:\

    In my workbench (Version 6.1.2373.0) I have customized a task sequence:

    "Format and Partition Disk" added a new partition

    then after "Install Operating System" I've added a "Run Command Line" called "Install D" which basically does

    an imagex to apply a separate wim file with the D:\ partition image

    Everything seems to work ok, no errors :) But when I check the

    c:\windows\temp\deploymentlogs\BDD.log

    after the install there is only one imagex command in there: the one that installs the operating system wim file

    No mention of my "Install D" command at all!

    Like I said it all looks ok, and the D:\drive exists ok but it's just bugging me why there is no log entry.

    I think it must have done it, unless somehow it's just kept the original D:\ partition intact, but can't see how as the format will

    have blatted it ?! Guess I could tweak the task to point at a non-existant wim file to see if it errors ?

    Thanks

    Ed (Puzzled)

All Replies

  • Friday, November 09, 2012 1:12 PM
     
     
    Can you upload the litetouch.log or bdd.log to a public storage?

    Regards, Vik Singh "If this thread answered your question, please click on "Mark as Answer"

  • Friday, November 09, 2012 1:20 PM
     
     Answered

    If your command line consists of a hardcoded "imagex /apply %deployroot%\Operating Systems\DDrive\DDrive.wim" (for example), then I would fully expect there to be no logs saying what's happening beyond a single reference saying "now running command xxxx" inside your smsts.log.

    The reason there are logs for the C: drive is that while it ultimately uses imagex to apply the WIM, the action actually calls LTIApply.wsf which is a script that creates a log and determines where to apply the image before finally calling imagex and logging the process of that command.

    If you want logs, then this is easily achieved with a short custom script. If you can't come up with anything yourself then feel free to say so and we'll see what we can do. The important part is that you don't need to worry about there being no log files for this particular action :)

    • Marked As Answer by EdTech2012 Monday, November 12, 2012 2:38 PM
    •  
  • Friday, November 09, 2012 3:53 PM
     
     

    Hi,

    the command is thus:

    Type: Run Command Line

    Name: Install D

    Command Line:"%DeployRoot%\Tools\X86\imagex" /apply "%DeployRoot%\Operating Systems\DDrive\apps.wim" 1 %DDrive%

    There is not a thing relating to this in the BDD.log, where is the smsts.log ?

    I guess if I can find the LTIApply.wsf script I can use that as a starting point for a "custom logging script".

    Thanks Ed

  • Friday, November 09, 2012 3:55 PM
     
     

    ..."public storage" ?

    any examples/recommend any ? We are firewalled here so may not be able

    Thanks

    Ed

  • Friday, November 09, 2012 6:44 PM
     
     Answered Has Code

    Logs will be stored in one of the following: X:\MININT\SMSOSD\OSDLOGS, C:\MININT\SMSOSD\OSDLOGS, or C:\Windows\Temp\DeploymentLogs

    In your case, probably the last one.

    For uploading text, this is one I just found http://textsave.de/ but I know there a load of others. Alternatively you could zip and upload the whole file using either dropbox or something like https://rapidshare.com

    And finally, here is a 100% untested script (although I copy/pasted most of it from LTIApply) but it should give you a very good start though even if it doesn't work first time.

    Example command line in the comments.

    <job id="ZTIApplyCustom">
       <script language="VBScript" src="ZTIUtility.vbs"/>
       <script language="VBScript">
    
    ' // ***************************************************************************
    ' // 
    ' // Copyright (c) Microsoft Corporation.  All rights reserved.
    ' // 
    ' // Microsoft Deployment Toolkit Solution Accelerator
    ' //
    ' // File:      ZTIApplyCustom.wsf
    ' // 
    ' // Version:   6.1.2369.0
    ' // 
    ' // 
    ' // Usage:     cscript ZTIApplyCustom.wsf /ImagePath:"%deployroot%\myimage.wim" /ImageIndex:"1" /DestinationDrive:"D:"[/debug:true]
    ' // 
    ' // ***************************************************************************
    
    	Dim retVal
    
    
    		' Apply the image
    
    		sCmd = " /apply """ & oEnvironment.Item(ImagePath) & """ " & oEnvironment.Item(ImageIndex) & " " & oEnvironment.Item(DestinationDrive) 
    
    		oLogging.ReportProgress "Applying image", 50
    		iRC = oUtility.FindExeAndRunWithLogging( "imagex.exe", sCmd )
    		TestAndFail iRC, 5624, "Run ImageX: " & sCmd
    
    
       </script>
    </job>
    

    • Marked As Answer by EdTech2012 Monday, November 12, 2012 2:37 PM
    •  
  • Tuesday, November 13, 2012 11:44 AM
     
     
    Thanks