## how to set a environnement value just for one applicatio

Please discuss general Delphi programming topics here.

### how to set a environnement value just for one applicatio

hi all
i have a question
i want to know if i can set a environment value like

Code: Select all
Cache = %USERPROFILE%\Local Settings\Temporary Internet Files

in the registry for just one application in Delphi

the case is that i need a TWebBrowser control in my application, this
control need to be use in mode no connection, so i make a directory
for this control to save some file, but i have to change this 'Cache'
key to make the application use this special directory, and that
works, but if the application was not exit normally, the environment
value won't be reset correctly

i have read some articles like 'customization of web browser control',
but they do just change the graphic of the web control
so, any one can help me?

PS: sorry for my poor english
iamnot
Member

Posts: 1
Joined: April 22nd, 2009, 9:08 am

### Re: how to set a environnement value just for one applicatio

I don't know how to set the cache directory for an instance of browser. However, I know if you set and reset registry entry inside a try/finally block, the entry will reset even if the application crashes.
Kambiz

Kambiz