SMSTS.log Summary
We are currently in the pilot phase of our Windows 7 deployment. Since we have a large number of new applications that were packaged with a number of dependencies and integration, I currently have "Continue on Error" unchecked on all steps the Task Sequence. The reason is that I don't want to hand out a machine to a pilot user with any missing or uninstalled apps. The problem with this approach (or any SCCM approach I can tell) is that if a technician is not sitting at the user's machine when the Task Sequence errors out on an application, the machine boots to the login prompt and appears as if it finished installing everything cleanly. Someone would physically have to log in and at least check to see that the last app I have in the TS installed correctly, otherwise they would never know the machine exited the task sequence. Has anyone come up with a way to use the "Continue on Error" option as a way to create a quick log file to show which applications failed to install? I realize you could look at the SMSTS.log, but I'm looking for something much simpler for the hardware techs who are imaging the pc's. My ideal scenario would be check "Continue on Error" for all applications, during the TS capture an error when/if it occurs, write the error to a log file (a line as simple as "Adobe Flash Player failed to install", and at the end of the Task Sequence, display either the log file itself, or a pop up message (VBS) with a list of the apps that had errors installing. So essentially I'm looking for a wrapper or at least a trigger where I can get access to "Continue on Error", and create a custom log or pop up message at the end of the TS based on those errors for the hardware guys. Has anyone tried anything like this? Can it be done? Thanks, Bill
September 13th, 2011 7:56pm

Maybe this will give you some idea's: http://www.petervanderwoude.nl/post/copy-logs-from-a-failed-task-sequence-in-configmgr-2007/ This is just an example of how to automaticly copy the logs from a failed Task Sequence, in general.My Blog: http://www.petervanderwoude.nl/ Follow me on twitter: pvanderwoude
Free Windows Admin Tool Kit Click here and download it now
September 13th, 2011 9:22pm

Steve Rachui posted a complete example a while back: http://blogs.msdn.com/b/steverac/archive/2008/07/15/capturing-logs-during-failed-task-sequence-execution.aspx. This essentially the exact same method adopted by MDT. An alternative or supplemental thing to do is set the SMSTSErrorDialogTimeout task sequence variable to increase the timeout value: http://technet.microsoft.com/en-us/library/bb632442.aspx.Jason | http://myitforum.com/cs2/blogs/jsandys | Twitter @JasonSandys
September 13th, 2011 9:28pm

Hi If your looking for a quick way for knowing if a Task Sequence have failed and you happen to have SCOM monitoring SCCM it's easy to set up. You will then get a mail/sms whitch Task Sequence failed and some info about what failed. But also as Jason suggested, increasing the SMSTSErrorDialogTimeout is a good idea. I wouldnt recommend checking Continue on error in TS for critical applications. Regards, Nicolai
Free Windows Admin Tool Kit Click here and download it now
September 13th, 2011 9:53pm

Those articles definitely take me further than I currently am, and I may be able to build off of them, but I'm not interested in just copying the SMSTS.log off the machine when an application fails. That's helpful, but it's overkill for our support staff. The first couple of steps of at least creating/copying a log file are very helpful though. Forgive me if I'm looking at the TS from a programming perspective, but I'm a programmer! So essentially what I'm looking for programmatically would be something like this: 1) Turn "Continue on Error" on at the top level like the article describes 2) During the TS, IF _SMSTSLastActionSucceeded=False, immediately Get _SMSTSCurrentActionName 3) Write "The application _SMSTSCurrentActionName failed to install" to the log file 4) Repeat and append the log file for each _SMSTSLastActionSucceeded=False 5) Execute a call at the very end of the TS to open the log file if it's file size > 0 KB or if it has any text at all and display a list of the applications that failed to install--and possibly wait for input or at least acknowledgement before proceeding. I also admit I may be a little confused by the _SMSTSLastActionSucceeded variable. If Continue on Error is checked, and it gets to the end of the TS but the last action succeeded, how does the "Error Catching Group" know to activate? The article almost reads as if Continue on Error actually means On Error Goto Error Catching Group. So I'll admit I'm confused by the process in general. But even still, I would like to create a custom log essentially based off of _SMSTSLastActionSucceeded=False and _SMSTSCurrentActionName. That's really all I want to do, I just don't know how to create log lines when those events occur or if it's even possible.
September 13th, 2011 10:24pm

It depends on at which level you check the Continue on error. In this example we put it at a group level, so if one part of the group fails the rest of the group will be skipped, but it will continue at the next group again. And in this example we use _SMSTSLastActionSucceeded equals False at the Error Catching Group, so it will only be executed if a previous action failed and not if everything succeeded.My Blog: http://www.petervanderwoude.nl/ Follow me on twitter: pvanderwoude
Free Windows Admin Tool Kit Click here and download it now
September 14th, 2011 9:03am

I'm still confused by the Error Catching Group. When you say "_SMSTSLastActionSucceeded equals False at the Error Catching Group...will only be executed if a previous action failed", doesn't that mean it will only execute if the LAST application group failed? In other words, if I have ten groups, and 3 programs within the ten groups fails, but the last group succeeds, wouldn't _SMSTSLastActionSucceeded = TRUE and therefore, how does the TS know to enter the Error Catching Group? Again sorry if I'm thinking of this programmatically, but I'm not understanding the built in logic. The way I understand that variable, it resets with each action. So how can I throw a log or create a list for each program where _SMSTSLastActionSucceeded equaled False at the time it was run? That's all I'm looking for. I don't want the full SMSTS.log.
September 14th, 2011 5:29pm

That's correct, it won't go to the Error Catching Group if the last action was succesfull. But the article was only meant to give an example of what's all possible... In your case, if that's really what you, you will probably end up with an error cathing step after each software installation step.My Blog: http://www.petervanderwoude.nl/ Follow me on twitter: pvanderwoude
Free Windows Admin Tool Kit Click here and download it now
September 15th, 2011 1:23pm

GOT IT! That's painstaking, but it makes sense now... So here is what I did to try and make this work... 1) For the first task under Install Applications in my task sequence (I'm not concerned yet with error trapping the OS or drivers for now, just the apps), I created a Run Command Line called "Create Temp Directory for Error Trapping". The command line is: cmd.exe /c md "C:\Temp" 2) I then checked all of my installations in the task sequence to "Continue on Error". 3) After each application/task in the task sequence, I created and then copied and pasted a Run Command Line called "Error Trapping" that only executes if _SMSTSLastActionSucceeded = False. I also set each "Error Trapping" command line to Continue on Error and I modified the command lines slightly for each app. So if an error occurs during the Office 2010 installation, I have "Error Trapping" running right after it looking for the _SMSTSLastActionSucceeded variable set to false, and if it finds it to be false, the command line I have set is: cmd.exe /c echo "Microsoft Office 2010 failed to install successfully." >C:\Temp\TS.log When I run this command line, it creates the TS.log file if it doesn't exist, and adds the echo statement to the log file. Subsequently, if Adobe Reader fails later in the TS, I have an "Error Trapping" Run Command Line right after it that says: cmd.exe /c echo "Adobe Reader X failed to install successfully." >C:\Temp\TS.log Again if the log hasn't been created, this should create it and add the echoed line. If the log file already exists, it will append the echo statement to the end of the existing log so my log file should look like this if both Office and Reader failed to install: ================ Microsoft Office 2010 failed to install successfully. Adobe Reader X failed to install successfully. =============== And at the very end of my TS, I have a final Run Command Line called "Error Reporting" with this: cmd.exe /c If Exist "C:\Temp\TS.log" Edit "C:\Temp\TS.log" This should launch the custom log file in Notepad, but only if an app has failed, at the end of the build process. So far, everything works except for the last Run Command Line. If anyone has any ideas, let me know? Otherwise I'm just planning to make that last step a package with a VB Script that does the same thing--opens the text file in Notepad AND I can probably use the VB Script to wait for input before handing the pc over to the user. I'm pretty sure this will work. Thanks again. I wish there were something a little simpler, but this looks like it should do what I'm looking for.
September 15th, 2011 4:59pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics