I am trying to delete the content of Outlook 2010. The location is right. Using the following script as a logoff script to delete the content (location of Office2010 is the right one there are the files but they stay there after several restart of the Windows 7 system the scipt is also not working when start it manually. The scipt is in a batchfile OLK.cmd:
rem ***** this script is answer for wollowing: http://support.microsoft.com/kb/817878 rem *** tested on Wiindows XP, 7; office 2007, 2010 VERIFY OTHER 2>nul setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION if errorlevel 1 goto :eof for /f "skip=2 tokens=2*" %%a in ('reg query HKCU\Software\Microsoft\Office\11.0\Outlook\Security /v OutlookSecureTempFolder') do set office2003=%%~sb if defined office2003 ( call :clear %office2003% set office2003=) for /f "skip=2 tokens=2*" %%a in ('reg query HKCU\Software\Policies\Microsoft\Office\11.0\Outlook\Security /v OutlookSecureTempFolder') do set office2003=%%~sb if defined office2003 ( call :clear %office2003% set office2003=) for /f "skip=2 tokens=2*" %%a in ('reg query HKCU\Software\Microsoft\Office\12.0\Outlook\Security /v OutlookSecureTempFolder') do set office2007=%%~sb if defined office2007 ( call :clear %office2007% set office2007=) for /f "skip=2 tokens=2*" %%a in ('reg query HKCU\Software\Policies\Microsoft\Office\12.0\Outlook\Security /v OutlookSecureTempFolder') do set office2007=%%~sb if defined office2007 ( call :clear %office2007% set office2007=) for /f "skip=2 tokens=2*" %%a in ('reg query HKCU\Software\Microsoft\Office\14.0\Outlook\Security /v OutlookSecureTempFolder') do set office2010=%%~sb if defined office2010 ( call :clear %office2010% set office2010=) for /f "skip=2 tokens=2*" %%a in ('reg query HKCU\Software\Policies\Microsoft\Office\14.0\Outlook\Security /v OutlookSecureTempFolder') do set office2010=%%~sb if defined office2010 ( call :clear %office2010% set office2010=) call :clear %temp%\ goto :eof :clear attrib -H /D /S "%1*" DEL /S /Q /F "%1*.*" for /D %%d in ("%1*.*") do RD /S /Q "%%d"
freddie