Delete Local Profiles in XP Script
If you wish to clear the profiles on a computer for any reason here is a script i wrote that will do this. If you wish to do this every time the computer is shut down you can add the script to the a group policy.
The Code
Const LocalDocumentsFolder = "C:\Documents and Settings\"
set objFSO = createobject("Scripting.FileSystemObject")
set objFolder = objFSO.GetFolder(localdocumentsfolder)
Dim FirstLetter
on error resume next
for each fldr in objFolder.SubFolders
if not isexception(fldr.name) then
objFSO.DeleteFolder fldr.path, True
end if
next
'This section allows you to add exceptions to what folders are being deleted. I have added default admin account, all users and default user.
Function isException(byval foldername)
select case foldername
case "All Users "
isException = True
case "Default User "
isException = True
case "Administrator"
isException = True
case Else
isException = False
End Select
End Function
MyPCHealth