Set temp path by Policy

  • Thread starter Slobodan Brcin \(eMVP\)
  • Start date
Y

Yaron Maor

Hi,

I would like to set the temp IE files & environment Temp paths to a RAM disk
Z:\
I found the registry locations to do it manually, but now I face two
problems:

1. when componentizing the reg data, how can I make sure it will run last in
FBA so the system will not overwrite it?
2. how can I make sure it is set as the default path for future new accounts
that will be created?

thanks,

YaronM
 
Y

Yaron Maor

Hi Slobodan,

I tried your suggestion, but it helps me only in the first boot of the Admin
account.
still, the limited user accounts are directed by the system to the default
c: drive.

is there anyone using a Ram-Disk for temporary storage out-there??
I'm sure I'm dealing with a problem that has a simple solution for it.
all I need is to make sure all system's Temp & IE temp files are always
saved on Z: drive.

hope someone could drop some info.

thanks,

YaronM
 
K

KM

Yaron,

I am wondering why don't you setup all the required reg.settings in
..DEFAULT reg.hive?
This will apply to all users.

I've done that for moving IE and other temp paths to Ram-Disk drive for all
users in system.

KM
 
S

Slobodan Brcin \(eMVP\)

Hi Yaron,
what do I benefit from it?

Nothing or everything depending on available space on your protected partition.
If you have enough free space on your partition for logs etc then you don't need ram-disk.
But if you have few MB of empty space then you will probably need ram disk.
Also consider commit command if you will use it in future. Logs made on RAM disk would not be committed. But if you make them on
system partition they will pollute your system.

Best regards,
Slobodan
 
Y

Yaron Maor

Thanks KM!

that's exctly what I was looking for.
bye the way, if I'm already using an EWF why do I need to move the temp and
IE cache to a Ram-Disk?
afterall, changes are not saved after reboot, so why giving away my Ram
storage? what do I benefit from it?

thanks,

YaronM
 
K

KM

Yaron,

Well.. having cache files with EWF RAM may not be a good idea. The cache is
dynamic (although size limitted) and you don't have much control over how
cache files are distributed/deleted/created on the disk. This mean that EWF
RAM overlay may potentially overflow after some time and cause very
unfreindly messages to the end user UI.
It does not hurt to move, say, IE cache to Ram disk. You are also in control
of how much RAM you take out by doing that. At the same time you may
consider this as a weakness compared to the growing from 0 EWF ram overlay
size.

In case you need the IE cache (for instance again) to be persistent over
reboot, you, of course, either move it to an unprotected real partition or
to a protected partition with EWF commited before reboot. Although, I must
admit that I don't see a good reason to make the cache persistent.

KM
 
K

KM

Yaron,

I don't have that system in front of me right now but reviewing your reg.
file I would aslo add these:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths]
"Directory"="Z:\\Temporary Internet Files\\Content.IE5"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths\path1]
"CachePath"="Z:\\Temporary Internet Files\\Content.IE5\\Cache1"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths\path2]
"CachePath"="Z:\\Temporary Internet Files\\Content.IE5\\Cache2"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths\path3]
"CachePath"="Z:\\Temporary Internet Files\\Content.IE5\\Cache3"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths\path4]
"CachePath"="Z:\\Temporary Internet Files\\Content.IE5\\Cache4"

(in case you want to move printer spooler temp directory as well)
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers]
"DefaultSpoolDirectory"="Z:\\Temporary Internet Files"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Print\Printers]
"DefaultSpoolDirectory"="Z:\\Temporary Internet Files"

(in case you don't want users to download files to protected partitions)
[HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer]
"Download Directory"="Z:\\"

I also recall that I could set
[HKEY_USERS\.DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths\pathX],"CachePath" is hex only (binary, not string).

I don't remember if I tested much creating a new account that time but I did
create and setup some accounts during FBA.

In any case, if it does not work for you, you can end up having a Runonce
item for all users (.DEFAULT hive) that will clean up itself in the registry
under HKCU key on the first run.

KM
 
Y

Yaron Maor

Hi KM,

I've created all the required reg settings for moving the IE and other Temp
to Ram-Disk,
but when a new user account logs in it is not effected.
could you detail me excatly what you setup for moving all type of Temps+IE
to Ram-Disk?
I attached a reg file for all the settings I've made.
I only succeded in changing the System's Temp+Tmp but not the User's Temp's.
also, the Admin's Temp's are ok because this account in staying unchanged.
my intention is to make sure each new user account that is created will be
directed to Z:\

thanks,

YaronM
 
S

Slobodan Brcin \(eMVP\)

Konstantin,
Well.. having cache files with EWF RAM may not be a good idea. The cache is
dynamic (although size limitted) and you don't have much control over how
cache files are distributed/deleted/created on the disk.
Right.

This mean that EWF
RAM overlay may potentially overflow after some time and cause very
unfreindly messages to the end user UI.

Not entirely true (but result would be the same). If he has for instance 20 MB available on protected parturition then MAX RAM
Overlay usage should be ~20 MB. (Excluding the times when he does system update).
But unfortunately after he run out of space on protected volume he will probably start getting messages anyway.
It does not hurt to move, say, IE cache to Ram disk. You are also in control
of how much RAM you take out by doing that. At the same time you may
consider this as a weakness compared to the growing from 0 EWF ram overlay
size.
In case you need the IE cache (for instance again) to be persistent over
reboot, you, of course, either move it to an unprotected real partition or
to a protected partition with EWF committed before reboot. Although, I must
admit that I don't see a good reason to make the cache persistent.

Agree.

Best regards,
Slobodan
 
Y

Yaron Maor

Hi KM,

thanks for the info.
apparently my mistake was trying to import keys to the HKLM while logged in
as a limited user.
I run on startup a batch with "reg import settemp.reg".
but some of the reg settings were HKLM and caused the whole file to get
"access denied" error.
I removed those and everything worked perfectly.
lastly- I found that all I need to set is:
[HKEY_USERS\.DEFAULT\Environment]
"TEMP"="z:\\"
"TMP"=hex(2):7a,00,3a,00,5c,00,00,00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell
Folders]
"Cache"="Z:\\Temporary Internet Files"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User
Shell Folders]
"Cache"=hex(2):7a,00,3a,00,5c,00,00,00

the HKLM settings I set once in the Admin profile or in TD during FBA.

thanks again!

YaronM


KM said:
Yaron,

I don't have that system in front of me right now but reviewing your reg.
file I would aslo add these:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths]
"Directory"="Z:\\Temporary Internet Files\\Content.IE5"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths\path1]
"CachePath"="Z:\\Temporary Internet Files\\Content.IE5\\Cache1"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths\path2]
"CachePath"="Z:\\Temporary Internet Files\\Content.IE5\\Cache2"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths\path3]
"CachePath"="Z:\\Temporary Internet Files\\Content.IE5\\Cache3"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths\path4]
"CachePath"="Z:\\Temporary Internet Files\\Content.IE5\\Cache4"

(in case you want to move printer spooler temp directory as well)
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers]
"DefaultSpoolDirectory"="Z:\\Temporary Internet Files"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Print\Printers]
"DefaultSpoolDirectory"="Z:\\Temporary Internet Files"

(in case you don't want users to download files to protected partitions)
[HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer]
"Download Directory"="Z:\\"

I also recall that I could set
[HKEY_USERS\.DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
Settings\Cache\Paths\pathX],"CachePath" is hex only (binary, not string).

I don't remember if I tested much creating a new account that time but I
did
create and setup some accounts during FBA.

In any case, if it does not work for you, you can end up having a Runonce
item for all users (.DEFAULT hive) that will clean up itself in the
registry
under HKCU key on the first run.

KM
Hi KM,

I've created all the required reg settings for moving the IE and other Temp
to Ram-Disk,
but when a new user account logs in it is not effected.
could you detail me excatly what you setup for moving all type of
Temps+IE
to Ram-Disk?
I attached a reg file for all the settings I've made.
I only succeded in changing the System's Temp+Tmp but not the User's Temp's.
also, the Admin's Temp's are ok because this account in staying
unchanged.
my intention is to make sure each new user account that is created will
be
directed to Z:\

thanks,

YaronM
 
K

KM

Slobodan,
Not entirely true (but result would be the same). If he has for instance 20 MB available on protected parturition then MAX RAM
Overlay usage should be ~20 MB. (Excluding the times when he does system update).
But unfortunately after he run out of space on protected volume he will probably start getting messages anyway.

Do you mean when he's got more RAM than his protected partition(s) overall size?
If so, I agree.

Regards,
Konstantin
 
S

Slobodan Brcin \(eMVP\)

Konstantin,
Do you mean when he's got more RAM than his protected partition(s) overall size?

No, I was wrong in saying this.
I meant that if he have enough of RAM to cover empty space reported by File System then he will be ok. Plus some small amount for
registry changes.

Best regards,
Slobodan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top