• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 11772
  • Last Modified:

Temporary Internet Files and Content.MSO in RDS

Hi,

I have a server for thin clients, with folder redirection for My Documents and Desktop to a file server.  Technically this would mean that the C:\Users folder does only content about 10meg per user.

Well it's not the case, the following folders keep filling up :
C:\Users\%Username%\AppData\Local\Temporary Internet Files
C:\Users\%Username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5
C:\Users\%Username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\\Low\Content.IE5
C:\Users\%Username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.MSO


Though a GPO forces the local cache not to be used, I can't find a setting to empty both IE cache folders and Outlook's attached items folder.

Question #1 : how can I stop this behavior ? I thought about a script to empty folders at logoff, but very "NT4-like".  I don't want to use roaming profiles, besides it won't solve the temp folders to be filled up, because I have folder redirection already, sorta beats the purpose.

Question #2 : why so many "Temporary Internet Files" location for one user ?

Question #3 : Can you control the way attached files work ? Location, extraction, etc.

Thanks.
0
DaBoags
Asked:
DaBoags
  • 3
  • 2
1 Solution
 
DaBoagsAuthor Commented:
So I tried this script.  It works when I type the commands, but once it is saved into a BAT file it gives an error "(rd was expected" on the second line then stops.

So if I open manually a command prompt, and type :
for /F %F in ('dir /b /ah "%localappdata%\Microsoft\Windows\Temporary Internet Files\Content.Outlook\"') do @if exist %F\ (rd /s /q "%F") else (del /q "%F")

it works.

Run the batch file, with the exact same command, it returns :
(rd was expected


What gives ???
cd "%localappdata%\Microsoft\Windows\Temporary Internet Files\Content.Outlook"
for /F %F in ('dir /b /ah "%localappdata%\Microsoft\Windows\Temporary Internet Files\Content.Outlook\"') do @if exist %F\ (rd /s /q "%F") else (del /q "%F")

cd "%localappdata%\Microsoft\Windows\Temporary Internet Files\Content.MSO"
for /F %F in ('dir /b /ah "%localappdata%\Microsoft\Windows\Temporary Internet Files\Content.MSO"') do @if exist %F\ (rd /s /q "%F") else (del /q "%F")

cd "%localappdata%\Microsoft\Windows\Temporary Internet Files\Content.IE5"
for /F %F in ('dir /b /ah "%localappdata%\Microsoft\Windows\Temporary Internet Files\Content.IE5"') do @if exist %F\ (rd /s /q "%F") else (del /q "%F")

cd "%localappdata%\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5"
for /F %F in ('dir /b /ah "%localappdata%\Microsoft\Windows\Temporary Internet Files\Low\Content.IE5"') do @if exist %F\ (rd /s /q "%F") else (del /q "%F")

cd "%localappdata%\Microsoft\Windows\Temporary Internet Files\Content.Word"
for /F %F in ('dir /b /ah "%localappdata%\Microsoft\Windows\Temporary Internet Files\Content.Word"') do @if exist %F\ (rd /s /q "%F") else (del /q "%F")

Open in new window

0
 
johnb6767Commented:
1. Have you looked at this setting (can set via policy)...

"Empty Temporary Internet Files folders when browser is closed"

2.
C:\Users\%Username%\AppData\Local\Temporary Internet Files
Nothing is actually in this folder (besides these folders you have already listed). It is a cumulative combination of the ACTUAL content.ie5 and the Cookies folder..... You only see files in it if  browsing the current logged in files. It is a Shell Folder, hence the special behaviour.

C:\Users\%Username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5
This is where the ACTUAL Temporary Internet Files are stored in 6 character randomly named subfolders.

C:\Users\%Username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\\Low\Content.IE5
This is where Protected Mode visits store the Temp Files.....

C:\Users\%Username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.MSO
This is the Outlook SecureTemp Folder.

3.
Yes, they can all be changed. You do not want to change the Temporary Internet Files folder. It is the CACHE "Shell Folder" value that would need to be changed.....

You can change the Outlook SecureTemp folder path here....
HKEY_CURRENT_USER\Software\Microsoft\Office\xx.0\Outlook\Security
 OutlookSecureTempFolder value is what you would want to modify....

0
 
johnb6767Commented:
That was the long answer to the whys......

In the batch file, remember the %F requires a second "%"....

for /F %%F in ('dir /b /ah "%localappdata%\Microsoft\Windows\Temporary Internet Files\Content.Outlook\"') do @if exist %%F\ (rd /s /q "%%F") else (del /q "%%F")
0
 
DaBoagsAuthor Commented:
Excellent it works now, so %F when you type, %%F when you batch...

aaaah why always so complex...
Thanks a million John, you've saved 11gb on three servers today :)
0
 
johnb6767Commented:
Glad I could help.....

And you are right on the syntax... I usually test line by line in a CMD prompt, when writing a batch script, and often forget the % or %% issue.... Think thats why I caught it....  :)
0

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now