lilkiddoe
asked on
changing location of cache/cookies/history of the webbrowser control
Is there any way to change the location of the cache/history of the webbrowser control? Like where it writes all its cookies? I don't mind using the SHDocVw.InternetExplorer class either.
I know that you can change the cookies directory and such inside the registry, however that only works for IEXPLORER.EXE, it will not work for anything you put in your program. If you use the webbrowser control or the internetexplorer class from your program, it will use the default directory C:\Documents and Settings\User\Cookies, and it won't use the directory that you set in the registry.
Does anyone know how to change these locations inside your program?
I know that you can change the cookies directory and such inside the registry, however that only works for IEXPLORER.EXE, it will not work for anything you put in your program. If you use the webbrowser control or the internetexplorer class from your program, it will use the default directory C:\Documents and Settings\User\Cookies, and it won't use the directory that you set in the registry.
Does anyone know how to change these locations inside your program?
ASKER
ok i'll look into that..
ASKER
Dim blnOptionSet As Boolean
blnOptionSet = InternetSetOption(vbNull, INTERNET_OPTION_SETTINGS_C HANGED, vbNull, 0&)
MsgBox blnOptionSet
It keeps on returning false.. INTERNET_OPTION_SETTINGS_C HANGED = 39, this flag is supposed to tell the application that the registry has been updated. But blnOptionSet keeps returning false, am I doing something wrong?
blnOptionSet = InternetSetOption(vbNull, INTERNET_OPTION_SETTINGS_C
MsgBox blnOptionSet
It keeps on returning false.. INTERNET_OPTION_SETTINGS_C
ASKER
ok.. i changed it to..
blnOptionSet = InternetSetOption(0&, INTERNET_OPTION_SETTINGS_C HANGED, 0&, 0&)
and it returned true.. i updated all the cookies directory in the registry, and it's still putting its cookies / cache inside the original directory specified by the registry when i started visual basic.
blnOptionSet = InternetSetOption(0&, INTERNET_OPTION_SETTINGS_C
and it returned true.. i updated all the cookies directory in the registry, and it's still putting its cookies / cache inside the original directory specified by the registry when i started visual basic.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dim blnOptionSet As Boolean
blnOptionSet = InternetOpen(scUserAgent, INTERNET_OPEN_TYPE_DIRECT,
MsgBox blnOptionSet
blnOptionSet = InternetSetOption(0&, INTERNET_OPTION_SETTINGS_C
MsgBox blnOptionSet
Just tried it.. that happens to not make a difference. However, before you submitted that comment.. I figured out that
1. all internet explorers have to be closed in order for the change in the registry to work.
2. even so, it will only work with internet exploer OBJECTS
3. it will not work with the webbrowser control that we draw on the form..
i'll give you some credit for that, but i would like further help..
Moderator, my recommended disposition is:
Accept rajaamirapu's comment(s) as an answer.
*** Mod, another option would be to decrease the points, as Akser wished ("some credit").
DanRollins -- EE database cleanup volunteer
Accept rajaamirapu's comment(s) as an answer.
*** Mod, another option would be to decrease the points, as Akser wished ("some credit").
DanRollins -- EE database cleanup volunteer
See help on InternetSetOption