scripting@wanadoo.nl




SetIEAutoDetect()

http://www.scriptlogic.com/kixtart/FunctionLibrary_FunctionList.aspx


actual FunctionLibrary list on 'Scriptlogic' site printer-friendly mirror of UDF topic on 'scripting@wanadoo.nl' site close
30 May 2003 SetIEAutoDetect()
AuthorBill Stewart (Albuquerque, NM)
Action Toggles the "Automatically detect settings" check box for IE.
SyntaxSetIEAutoDetect ($enable) 
Parameters
  • $enable (Required / Boolean) toggle 
  • RemarksToggles the appropriate bit in the registry setting
    HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\DefaultConnectionSettings
    (REG_BINARY). 
    Returns0 for success; non-zero for failure 
    DependenciesNone. 
    Examples
    $rc = SetIEAutoDetect(1)  ; Enable
    $rc = SetIEAutoDetect(0)  ; Disable
    
     
    Source
    FUNCTION SetIEAutoDetect ($enable)
      DIM $subkey, $value, $bit, $rc
     
      $subkey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections"
      $value = ReadValue($subkey, "DefaultConnectionSettings")
      $rc = @error
      IF $rc = 0
        $bit = Val(Substr($value, 18, 1))
        $bit = IIF($enable, $bit | 8, $bit & 7)
        $value = Substr($value, 1, 17) + DecToHex($bit) + Substr($value, 19, Len($value) - 18)
        $rc = WriteValue($subkey, "DefaultConnectionSettings", $value, "REG_BINARY")
      ENDIF
      $setieautodetect = $rc
    ENDFUNCTION ; - SetIEAutoDetect -
     
      original source of UDF topic. show actual FunctionLibrary list on Scriptlogic site close top
              printer-friendly mirror of UDF topic on scripting@wanadoo.nl site  




    Copyright © 2003 www.scriptlogic.com & scripting@wanadoo.nl - last updated on 15 October 2003


    Site Meter