WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Modify Internet Explorer Automatic Detect Setting


Question:

Here a short C program called IEAUTO that changes IE's "Automatically detect settings". I'd really appreciate it if someone would tranlate it into WIL. It involes some bit flipping on IE's "DefaultConnectionSettings".

Program and source found at http://www.ruffles.org.uk/dev/index-c.html

Answer:

Something like this (undebugged):
AddExtender("wilx44i.dll")
RegOpenKey ...
regvalue = RegQueryBin ...
hexbyte = ItemExtract(9, regvalue, " ")
decbyte = xHex(hexbyte)
If ... Then decbyte = decbyte & ~8
Else decbyte = decbyte | 8
hexbyte = StrFixLeft(xBaseConvert(decbyte, 10, 16), "0", 2)
regvalue = ItemReplace(hexbyte, 9, regvalue, " ")
RegSetBin ...

User Reply:

Thanks for the start. The C code allows the bit to be set either on or off. I'm looking to turn it off, so I've started with the assumption that "val=0".
AddExtender("wilx44i.dll")

val = 0

hndl=RegOpenKey(@REGCURRENT, "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections")
regvalue = RegQueryBin(hndl, "[DefaultConnectionSettings]")
hexbyte = ItemExtract(9, regvalue, " ")
decbyte = xHex(hexbyte)
If val == 0 
decbyte = decbyte & ~8
Else 
decbyte = decbyte | 8
Endif
hexbyte = StrFixLeft(xBaseConvert(decbyte, 10, 16), "0", 2)
regvalue = ItemReplace(hexbyte, 9, regvalue, " ")
RegSetBin ...

Article ID:   W16478
File Created: 2005:02:18:12:20:52
Last Updated: 2005:02:18:12:20:52