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

Postby iamnot » April 22nd, 2009, 9:19 am

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
Member
 
Posts: 1
Joined: April 22nd, 2009, 9:08 am

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

Postby Kambiz » April 24th, 2009, 2:03 pm

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
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 12 guests

cron