You are here:   Blog
Register   |  Login

Search

Minimize

RSS

Minimize

Deployment Research blog

Minimize

Final Configuration for MDT 2010 Lite Touch

Apr 26

Written by:
4/26/2011 2:38 PM  RssIcon

Sample script to execute code after the Task Sequence is completed.

This script will clean out any Leftover MININT or Sysprep folders. Enable WindowsUpdate, Set a default domain value (read from the JOINDOMAIN environment variable), and then do a proper final reboot...

Note: You need to set SkipFinalSummary=YES in customsettings.ini (the script will check for it)

Download from:
Final Configuration for MDT 2010 Lite Touch

Just kick of the Z-FinalConfig.wsf as your last action in the Task Sequencer. The script will kickoff the Z-FinalConfig.hta script, which will wait for Task Sequence to end, and then do the final configuration.



/ Johan 

11 comment(s) so far...


Gravatar

Re: Final Configuration for MDT 2010 Lite Touch

Hey Johan.

Thanks for the great script. I have a quick question.

Since I have started using the script, the machine reboots and tries to login but fails because the login is set as ./administrator. What could be causing this? What I am trying to accomplish is the machine does one final reboot and the last logged on user is cleared with the default domain set so a user can log in.

Also, the script seems to do the job other than that but it says the task sequence is still running and it goes through 3 passes.

Thanks so much for all your posts and scripts, they have been very helpful and I have learned a lot from you.

Thanks again.

By LANWrench on   5/20/2011 5:52 AM
Gravatar

Re: Final Configuration for MDT 2010 Lite Touch

Make sure to call the finalconfiguration.wsf script as the very last action in the task sequence, and also do not add any finishaction properties to customsettings.ini

/ Johan

By Arwidmark on   5/22/2011 12:18 AM
Gravatar

Re: Final Configuration for MDT 2010 Lite Touch

A great script but when I add it to the custom tasks group I get various errors and the build fails. I have all subsequent tasks disabled hence it should be the last script running. I have noticed that if I disable the Windows Update tasks the script and build complete successfully.

Errors are:
Failed to run the action: Tattoo. Incorrect function. (Error: 00000001; Source: Windows)
Failed to run the action: Windows Update (Post-Application Installation). Incorrect function. (Error: 00000001; Source: Windows)
The execution of the group (State Restore) has failed and the execution has been aborted. An action failed. Operation aborted (Error: 80004004; Source: Windows)
Failed to run the action: Final Configuration and Reboot. Incorrect function. (Error: 00000001; Source: Windows)

Interestingly the State Restore task is disabled.

Thanks in advance for any assistance.

By Jasper1uk on   8/29/2011 8:05 PM
Gravatar

Re: Final Configuration for MDT 2010 Lite Touch

You need to call the script (the .wsf file) as the last part of the task sequences, not as the last part of the state restore phase.

Please upload the Z-FinalConfig.log and your task sequence (ts.xml) somewhere and post the link here.

/ Johan

By Arwidmark on   8/30/2011 2:13 AM
Gravatar

Re: Final Configuration for MDT 2010 Lite Touch

Johan,

Thanks so much for your reply. I apologize for not getting back sooner as I have had a lot of other projects come up that I had to deal with.

So I moved the task sequence down as I had it in the "State Restore" thinking that was the last step but figured it wasn't after highlighting it and clicking "Down".

After doing this, I still was getting the same issue with the ./Administrator. I opened up the unattend.xml file and noticed that "." was set as the domain. I figured this could be causing the issue.

Why is it set to that, should it be some variable there?

Thanks for your help.

By LANWrench on   9/16/2011 5:07 AM
Gravatar

Re: Final Configuration for MDT 2010 Lite Touch

If the rules (cs.ini) are configured correctly, MDT will write the domina name to the unattend.xml during deployment.

Please upload all the logs, and your ts.xml somewhere and post the link here.

/ Johan

By Arwidmark on   9/16/2011 11:31 PM
Gravatar

Re: Final Configuration for MDT 2010 Lite Touch

Hi Johan
I hope you read comments on old posts :)
I have started to use this but since I have also looked at a webcast you had about logging in MDT I had setup
SLSHARE=\\SERVERNAME\MDTLogs$\%OSDComputerName%
SLSHAREDynamicLogging=\\SERVERNAME\MDTDynLogs$\

I have made sure that the final script is running last, but even so the folders remain. And from the logs it looks like the scripts is running OK but when the scripts is done then it moves the logs and the folders are left behind anyway. Is there anyway around this or is it just to disable the logging to server part?


Regards

By Psam on   11/8/2011 12:51 PM
Gravatar

Re: Final Configuration for MDT 2010 Lite Touch

Yes I do, :)

You can try giving the HTA more time to wait for the task sequence to finish... process monitor and process explorer are good tools to find out which process is locking the folder.

/ Johan

By Arwidmark on   11/8/2011 1:21 PM
Gravatar

Re: Final Configuration for MDT 2010 Lite Touch

I have been using your scripts to remove the MININT folder from freshly imaged Windows 7 computers at the very end of the task sequense. It appears to work flawlessly and consistantly until we tried to push out new software via the SCCM. It has come to my attention that this may be causing other issues. When the SCCM is trying install or upgrade programs it appears to fail on the uninstall of the legacy program and thusly doesn't move forward. Have you seen this kind of issue in any of your experience? Since I am the one that created the images and task sequences I was wondering if you had seen this kind of issue come up elsewhere?

Thank you in advance if you still check these older blog posts.

Regards,

Lara

By xatholasian on   1/12/2012 9:28 AM
Gravatar

Re: Final Configuration for MDT 2010 Lite Touch

Hi Lara,

There is no dependency in SCCM 2007 software distribution for the MININT folder, however this script is only for MDT 2010 Lite Touch. It should not be run as part of a SCCM 2007 Task Sequence.

/ Johan

By Arwidmark on   1/17/2012 4:19 AM
Gravatar

Re: Final Configuration for MDT 2010 Lite Touch

I work only with the MDT, it was a counter part of mine that is responsible for the SCCM and had brought to my attention that it might be that MININT folder that was being left behind that was the issue with something that they were trying to do. (uninstall MSOffice 2003 and install MSOffice 2007) It has since been discovered that the MININT folder was not the crux of the issue. In the discovery of that I also found that because I had put in a PC Restart in the TS right before Install Applications in the State Restore portion of the TS, it was causing the LTIcleanup portion not to do its job and remove the MININT folder among other things.

You scripts worked well and I have since not needed to use them since I removed that Restart from the sequence. Granted there is still the issue of the Office uninstalls and new install of the new Office but that is for another forum at this point. At the time I wrote that post I had been given the impression that it might have something to do with those steps in the sequence.

Thank you for responding, I appreciate it.

Lara

By xatholasian on   1/24/2012 9:57 AM