@ECHO OFF CLS ECHO System Preparation Tool ECHO. ECHO Before continuing please: ECHO 1. Be sure that the pre-sysprep steps were followed. ECHO 2. Image the computer previous to this, as the sysprep ECHO process may fail and this would corrupt the installation ECHO you have prepared. ECHO 3. Restart the computer before attempting this so that ECHO system buffers are cleared. ECHO 4. Close all open windows before continuing. ECHO. pause ECHO. ECHO Flushing data to disks (preliminary): sync -r -e ECHO. ECHO Cleaning up old driver caches: del /s /q c:\drivers\infcache.1 ECHO. ECHO Creating driver path (SysPrep Driver Scanner): spdrvscn /p c:\drivers /e inf /d C:\windows\inf /a /s /q ECHO. ECHO Closing open SMB connections: net use * /delete /yes ECHO. ECHO Terminating unneeded processes: kill /f vptray kill /f ccapp kill /f explorer kill /f alg kill /f ati2evxx kill /f ccevtmgr kill /f ccsetmgr kill /f defwatch kill /f lucoms~1 kill /f mdm ECHO. ECHO Stopping unnessary services: net stop alerter /yes net stop wuauserv /yes net stop browser /yes net stop cryptsvc /yes net stop dhcp /yes net stop mdm /yes net stop trkwks /yes net stop protectedstorage /yes net stop remoteregistry /yes net stop seclogon /yes net stop samss /yes net stop wscsvc /yes net stop lanmanagerserver /yes net stop "symantec antivirus" /yes net stop defwatch /yes net stop ccevtmgr /yes net stop sndsrvc /yes net stop ccpwdsvc /yes net stop ccsetmgr /yes net stop sens /yes net stop srservice /yes net stop schedule /yes net stop lmhosts /yes net stop ups /yes net stop uphclean /yes net stop webclient /yes net stop audiosrv /yes net stop sharedaccess /yes net stop msiserver /yes net stop w32time /yes net stop wzcsvc /yes net stop lanmanworkstation /yes net stop spooler /yes ECHO. ECHO Removing cached OEM drivers... attrib -r -a -s -h C:\windows\inf\oem*.* del /q c:\windows\inf\oem*.* del /q c:\windows\inf\infcache.1 ECHO. ECHO Clear the event logs... psloglist -c application psloglist -c security psloglist -c system ECHO. ECHO Flushing data to disks (finalization): sync -r -e ECHO. ECHO Executing system preparation tool (reseal / minisetup)... start sysprep -reseal -mini -quiet