Final Configuration for MDT 2010 Lite Touch

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

UPDATE 2014-03-09: There is an updated version of this post on the below link:

Final Configuration for MDT 2013 Lite Touch, now with Autologon support
https://deploymentresearch.com/Research/tabid/62/EntryId/122/Final-Configuration-for-MDT-2013-Lite-Touch-now-with-Autologon-support.aspx

Final Configuration for MDT 2010 Lite Touch

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 add the Z-FinalConfig.wsf as your last action in the Task Sequence. The script will in turn run the Z-FinalConfig.hta script, which will wait for Task Sequence to end, and then do the final configuration.

/ Johan 

About the author

Johan Arwidmark

0 0 votes
Article Rating
Subscribe
Notify of
guest
21 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
jewen
jewen
8 years ago

I was wondering if there is a way to reduce the amountnumber of autologons down 3. I like the feature and used to do something similar using the unattend.xml file before I met MDT. Just for info I tried adjusting the 999 value to 3. To test I just created a custom task sequence and ran the litetouch.vbs script from an already built win 8-1 vm which did have the FinalConfig set as the last task. This however didn't seem to make a difference. I am probably missing something really easy. Many thanks on your generous contribution, I like many… Read more »

Admin
Admin
9 years ago

Very cool, thanks for the tip, and for sharing with the community.

Would you mind if I updated the article with a link to your script?

/ Johan

akoby
akoby
9 years ago

I know this is an older topic on performing some final clean up actions with MDT 2010, but a long time ago I struggled to find a way to get rid of pesky MiniNT folder that seems to linger around once you're done with your deployment. What I decided to do was write a script that uses the 'PendingFileRenameOperations' method for removing these files and folder left behind. To do this is a little tricky, but the script basically builds a list of files and folders starting at the deepest level, converts this to hex and creates a reg file… Read more »

akoby
akoby
9 years ago

I know this is an older topic on performing some final clean up actions with MDT 2010, but a long time ago I struggled to find a way to get rid of pesky MiniNT folder that seems to linger around once you're done with your deployment. What I decided to do was write a script that uses the 'PendingFileRenameOperations' method for removing these files and folder left behind. To do this is a little tricky, but the script basically builds a list of files and folders starting at the deepest level, converts this to hex and creates a reg file… Read more »

Admin
Admin
10 years ago

Hi Leif,

You can use this HTA to set autologon for MDT 2012 as well, but you should do it in vbscript so that it's easier to call it in the HTA. Check the PopulateAutoAdminLogon function in the Litetouch.wsf script for an example.

/ Johan

leialm
leialm
10 years ago

Oh, and this is for MDT 2012, latest, of course.

leialm
leialm
10 years ago

Johan,I looked into your script Z-FinalConfig.hta in order to get a solution for autoadminlogon after mdt.I had some problems with keeping the registry keys for autoadminlogon when doing a solution like yours, monitoring for TSManager.exeit seems TSManager.exe terminates, and after that is the cleanup, LTICleanup.wsf a solution is of course to add some pause to be (quite) sure that my script runs after LTICleanup.wsf but I think this is a good idea: monitor registrykey autoadminlogon. is it 0, continue with my settings for autologon. is it 1 check again. since I am a dos guy, my script would be::apatimeout 1reg.exe… Read more »

Admin
Admin
10 years ago

The script needs to be run as the very final action of the task sequence. I run another version of this script in MDT 2012 myself and it works fine.

If you download any of my hydration kits (like this: https://deploymentresearch.com/Research/tabid/62/EntryId/82/The-Hydration-Kit-for-ConfigMgr-2012-SP1-with-Windows-Server-2012-SQL-Server-2012-is-available-for-download.aspx) you find a version that is tested on MDT 2012.

/ Johan

lakorai
lakorai
10 years ago

Doesn't work in MDT 2012 with a SysPrepped Windows 7 X64 image. I have added this script to the final part of the PostInstall step (After restart computer) in the task sequence, using the line cscript.exe "%SCRIPTROOT%Z-FinalConfig.wsf" command line and nothing comes up after the reboot. It boots into the Administrator login and then does nothing if the USB stick is plugged in. If it is not plugged in it will complain about the deployment media is not plugged in. I have verified that the script is in both the USB drive's script folder and in the deployment share's script… Read more »

iveyithaca1
iveyithaca1
10 years ago

I realize this is a fairly old post but, here goes. I've been experimenting with MDT 2010/2012 over the last year. Both MDT and WDS work well and I just need a few minor tweaks to make it exactly what I need for my environment. I'm trying to get as thin of a image as possible. I have the install.wim from the Windows 7 Pro iso deploying as a Standard Task Sequence. I then am injecting the drivers necessary based on make and model as well as deploying applications and wsus updates. My unattend answer file does most of what… Read more »

xatholasian
xatholasian
11 years ago

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… Read more »

Admin
Admin
11 years ago

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

xatholasian
xatholasian
11 years ago

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… Read more »

Admin
Admin
11 years ago

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

Psam
Psam
11 years ago

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=SERVERNAMEMDTLogs$%OSDComputerName%
SLSHAREDynamicLogging=SERVERNAMEMDTDynLogs$

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

Admin
Admin
11 years ago

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

LANWrench
LANWrench
11 years ago

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… Read more »

Admin
Admin
11 years ago

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

Jasper1uk
Jasper1uk
11 years ago

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;… Read more »

Admin
Admin
12 years ago

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

LANWrench
LANWrench
12 years ago

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… Read more »


>