I have a script that works on SP1 but not on SP2. I get a permission denied error. I run it with admin privileges and I have full permissions to the server and it's directories. What is it about SP2 that won't allow this? Here is the script if it helps:
Dim fso, f, f1, fc
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("D:\Program Files\aaaaa\bb\logfiles")
Set fc = f.Files
For Each f1 in fc
If DateDiff("d", f1.DateLastModified, Now) > 14 Then f1.Delete
Next
Dim fso, f, f1, fc
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("D:\Program Files\aaaaa\bb\logfiles")
Set fc = f.Files
For Each f1 in fc
If DateDiff("d", f1.DateLastModified, Now) > 14 Then f1.Delete
Next