The sample client task ‘Delete Temporary Files’ does not delete any files on computers running Windows Vista, Windows 7, or Windows 2008 operating systems. The task does delete files on computers running operating systems such as Windows 2003 and Windows XP.
No error messages or exceptions are thrown. The task still runs on computers with these operating systems but it does not delete any files.
The sample client task ‘Delete Temporary Files’ was designed to delete all files for all user profiles in the following locations:
C:\Documents and Settings\<User Name>\Local Settings\Temp
C:\Documents and Settings\<User Name>\Local Settings\Temporary Internet Files
However on newer operating systems (Windows Vista, Windows 7, Windows 2008), the temporary files for a user profile are not saved in this location. Instead, they are saved to:
C:\Users\<User Name>\AppData\Microsoft\Windows\Temporary Internet Files.
The task still runs on these operating systems but it does not delete any files nor throw any exceptions.
One possible workaround for this issue is to clone the existing sample task and then modify the clone so that it looks in the correct location for
3. Save Changes to the script.
Note: These changes do not work in every situation. Not all of the files are deleted on Windows 2008 R2 computers and temporary Internet files are not
deleted at all by this Task.
Computers using Windows Vista, Windows 7, or Windows 2008.