Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change settings in Internet Explorer

Status
Not open for further replies.

AGP

Programmer
Sep 11, 2001
97
GB
Hi,
Could anyone tell me whether it is possible to programatically change some of the settings in Internet Explorer. The settings I wish to change are:

- automatically connect to Internet
- disconnect after 5 minutes

If it is possible I am guessing you would use the MS WebBrowser Control??? Any help would be much appreciated.
 
Your program will have to modify the registry to adjust those settings. For the current user, the key is:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
You will work in the corresponding HKEY_LOCAL_MACHINE key to set the values globally.

The value names are:
AutoConnect
DisconnectIdleTime
EnableAutodial
EnableAutodisconnect


You can find tips for writing registry values elsewhere in the Tek-Tips VB forums.

Have fun. Don't hurt anybody.
VCA.gif
 
Hi,
thankyou for replying to my question. It gave me a good place to start from and I successfully managed to set the AutoConnect, EnableAutodial and EnableAutodisconnect properties. I am having a few problems with the DisconnectIdleTime property as this seems to only accept a binary value e.g 05 00 00 00. There seems to be no documentation on how to set a binary value using visual basic!

You mentioned that I should use the HKEY_LOCAL_MACHINE key to set the value globally i.e so it applies to all users. However, when I tried this under HKEY_LOCAL_MACHINE if failed to initiate the autoconnect feature?

many thanks once again.

 
All of the preceeding settings are in binary format.

You would use
Code:
Private Const REG_BINARY = 3
and then something like
Code:
:
retval = RegSetValueEx(keyhandle, strValue, 0, REG_BINARY, binData, Len(binData))
...to set the value.

AutoConnect should work in the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings key.... but I only tested it on one machine (Win98). Are you dealing with OS or machine-specific issues?
VCA.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top