Script Name: Clean up old user profiles. Script Description: This script will remove any local user profiles that have not been accessed in the last 365 days. This script will only work correctly on Windows 2000 or better, and uses touch.exe from http://unxutils.sf.net and the delprof.exe windows resource kit utility. If there are any user profiles other than administrator that you absolutely *don't* want to remove copy step 4 and change the path to match the correct one for the user profile you want to leave alone. IF True THEN Get Variable Parameter 1 : 10 Parameter 2 : Parameter 3 : tempPath OS Type : 1 Write File Parameter 1 : #tempPath#\touch.exe Parameter 2 : VSASharedFiles\touch.exe OS Type : 1 Write File Parameter 1 : #tempPath#\delprof.exe Parameter 2 : VSASharedFiles\delprof.exe OS Type : 1 Execute File Parameter 1 : #tempPath#\touch.exe Parameter 2 : "%SYSTEMDRIVE%\Documents and Settings\Administrator\NTUSER.DAT Parameter 3 : 3 OS Type : 1 Execute Shell Command Parameter 1 : #tempPath#\delprof.exe /Q /D:365 >> #tempPath#\proflog.txt Parameter 2 : 1 OS Type : 1 Get Variable Parameter 1 : 1 Parameter 2 : #tempPath#\proflog.txt Parameter 3 : profLog OS Type : 1 Write Script Log Entry Parameter 1 : #profLog# OS Type : 1 Delete File Parameter 1 : #tempPath#\delprof.exe OS Type : 1 Delete File Parameter 1 : #tempPath#\touch.exe OS Type : 1 Delete File Parameter 1 : #tempPath#\proflog.txt OS Type : 1 ELSE
Script Name: Clear cached roaming profiles. Script Description: This script can be used to clear cached roaming profiles from a system. It requires touch.exe from the UnixUtils project ("http://unxutils.sf.net") and delprof.exe from the windows resource kit. IF True THEN Get Variable Parameter 1 : 10 Parameter 2 : Parameter 3 : tempPath OS Type : 1 Write File Parameter 1 : #tempPath#\touch.exe Parameter 2 : VSASharedFiles\touch.exe OS Type : 1 Write File Parameter 1 : #tempPath#\delprof.exe Parameter 2 : VSASharedFiles\delprof.exe OS Type : 1 Execute Shell Command Parameter 1 : #tempPath#\delprof.exe /Q /R >> #tempPath#\proflog.txt Parameter 2 : 1 OS Type : 1 Get Variable Parameter 1 : 1 Parameter 2 : #tempPath#\proflog.txt Parameter 3 : profLog OS Type : 1 Write Script Log Entry Parameter 1 : #profLog# OS Type : 1 Delete File Parameter 1 : #tempPath#\delprof.exe OS Type : 1 Delete File Parameter 1 : #tempPath#\touch.exe OS Type : 1 Delete File Parameter 1 : #tempPath#\proflog.txt OS Type : 1 ELSE