Enable/Disable Integrated Windows Authentication (VBScript)

[vb]
Option Explicit

‘———————————————————————–
‘ Enable/Disable Windows Integrated Authentication setting in IE8
‘ Developer: Tom Gee
‘ Date: 12.16.2011
‘———————————————————————–

Dim WSHShell, RegKey
Dim strInput, strCurrValue, strEnabled, strDisabled, strNewValue

strEnabled = “enabled”
strDisabled = “disabled”

set WSHShell = CreateObject(“WScript.Shell”)
RegKey = “HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsEnableNegotiate”

ReadRegistry

strInput = MsgBox(“Integrated Windows Authentication is currently ” & strCurrValue & “.” & vbcrlf & vbcrlf & “Do you want to change this value?”,vbYesNo,”Change Current Value?”)

If strInput = vbYes Then
If strCurrValue = strEnabled Then
strNewValue = “0”
Else
strNewValue = “1”
End If

WSHShell.RegWrite RegKey, strNewValue, “REG_DWORD”

ReadRegistry

strInput = MsgBox(“Integrated Windows Authentication has now been set to ” & strCurrValue & “.”)
End If

Sub ReadRegistry()
strCurrValue = WSHShell.RegRead(RegKey)

If strCurrValue = “1” Then
strCurrValue = strEnabled
Else
strCurrValue = strDisabled
End If
End Sub
[/vb]