Okay, reading Jade solution I see that it is not exceptable for most Admins, but may work if all you want/need to support is that folder structure.
1. If folder is located on D: E: etc won't work
2. If folder has been renamed won't work
3. Will not support WinNT upgraded systems with profiles typically in C:\WinNT\Profiles
4. Does not address registry cleanup like Christophe's does.
Code:
$files = Dirplus('c:\documents and settings')
for each $file in $files
If not instr($file,'Administrator')
$file='"'+$file+'\"'
do ? $file
?'Would you like to delete this profile? y/n>' gets $deleteIt
until $deleteIt
if $deleteIt='y'
do ? $file
? 'Are you sure you want to delete this profile? Y/N>' gets $confirm
until $confirm
endif
if $confirm = 'y'
SHELL '%COMSPEC% /C RD ' + $file+' /S /Q'
?@error @serror
sleep 1
endif
endif
$deleteIt = ''
$confirm = ''
next