Needs some help adding to script please.
I have users that get attachments in outlook on a daily basis. All of them have the exact same name. Once they hit the 100 attachment outlook gives an error and they cannot open any more with that name. Outlook stores the attachments in a randomly named folder.
After searching for a batch file or another script I found this script below and modified it so outlook 2003 and 2010 secure temp folders get deleted.
I don't like the idea of it just running with out a prompt to run or cancel. Can some one please help me add that option to the script
I have users that get attachments in outlook on a daily basis. All of them have the exact same name. Once they hit the 100 attachment outlook gives an error and they cannot open any more with that name. Outlook stores the attachments in a randomly named folder.
After searching for a batch file or another script I found this script below and modified it so outlook 2003 and 2010 secure temp folders get deleted.
I don't like the idea of it just running with out a prompt to run or cancel. Can some one please help me add that option to the script
Code:
Set oWSH = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
For Each sKey in Array("11.0","14.0")
sOutSecTmp = Empty
On Error Resume Next
sOutSecTmp = oWSH.RegRead("HKCU\Software\Microsoft\Office\" _
& sKey & "\Outlook\Security\OutlookSecureTempFolder")
If Len(sOutSecTmp) > 3 Then
oFSO.DeleteFile oFSO.BuildPath(sOutSecTmp,"*.*"), True
End If
Next
msgbox ("Outlook Secure Temp Folder has been cleaned.")